Skip to content

Commit

Permalink
fix(Launcher): Terminate chrome gracefully on Windows (#876)
Browse files Browse the repository at this point in the history
This patch starts using taskkill program on windows to gracefully
terminate chrome.

Note: this slows down chrome shutdown on Windows in case of using
custom userDataDir. This is because chrome takes some time to shutdown
its operations and leave profile directory in a consistent state.

Fixes #839.
  • Loading branch information
aslushnikov committed Sep 29, 2017
1 parent f625502 commit cb280c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Launcher.js
Expand Up @@ -129,7 +129,7 @@ class Launcher {
} else {
// Terminate chrome gracefully.
if (process.platform === 'win32')
chromeProcess.kill();
childProcess.execSync(`taskkill /pid ${chromeProcess.pid}`);
else
process.kill(-chromeProcess.pid, 'SIGTERM');
}
Expand Down

0 comments on commit cb280c5

Please sign in to comment.