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

fix(launcher): cancel kill timeout when process exits cleanly #1054

Merged
merged 1 commit into from
May 10, 2014

Conversation

pkozlowski-opensource
Copy link
Member

By default browsers are killed with process.kill() but it might
happen that a process doesn't play nicelly and doesn't exit so
there is a timeout after which a process is SIGKILL-ed. Before
this commit the mentioned timeout wasn't cleared on clean process
exit, preventing Karma from exiting just after all tests were run.

Fixes #946

@@ -110,6 +110,10 @@ var ProcessLauncher = function(spawn, tempDir, timer) {
}

self._process = null;
if (self._killTimer) {
timer.clearTimeout(self._killTimer);
self._killTimer = undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please set this to null ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please set this to null ?

Why is null better than undefined here?

By default browsers are killed with `process.kill()` but it might
happen that a process doesn't play nicelly and doesn't exit so
there is a timeout after which a process is SIGKILL-ed. Before
this commit the mentioned timeout wasn't cleared on clean process
exit, preventing Karma from exiting just after all tests were run.

Fixes karma-runner#946
@pkozlowski-opensource
Copy link
Member Author

@vojtajina amended the commit to use null instead of undefined.

@vojtajina
Copy link
Contributor

Merging...

@vojtajina vojtajina merged commit bd66274 into karma-runner:master May 10, 2014
bendrucker added a commit to bendrucker/karma-as-promised that referenced this pull request Jun 18, 2014
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.

Process Launcher does not clean up sigkill timeout
3 participants