Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop runner sending SIGINT to itself from within SIGINT handler #1752

Merged
merged 1 commit into from Jul 4, 2015
Merged

Stop runner sending SIGINT to itself from within SIGINT handler #1752

merged 1 commit into from Jul 4, 2015

Conversation

gsilk
Copy link
Contributor

@gsilk gsilk commented Jun 17, 2015

This prevents an infinite loop when the child process (the target of the runner, ie your tests) installs a SIGINT / SIGTERM handler. You might want to do this, for example, if you need to ensure clean shutdown of your tests when the user presses Ctrl+C. I ran into this problem when spawning a subprocess from the setup portion of my tests, and trying to capture SIGINT in the test suite.

@jbnicolai
Copy link

Hmm, fair enough. I've done some testing, and all seems to work. Odd that this was originally included in the first place..

jbnicolai pushed a commit that referenced this pull request Jul 4, 2015
Stop runner sending SIGINT to itself from within SIGINT handler
@jbnicolai jbnicolai merged commit 3815f59 into mochajs:master Jul 4, 2015
@boneskull
Copy link
Member

@gsilk good catch thx. My bad

@gsilk
Copy link
Contributor Author

gsilk commented Jul 7, 2015

@boneskull np

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants