From c082a82547fc309628c74c3f433c2b4dc873edc3 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 15 Mar 2018 11:50:16 -0700 Subject: [PATCH] fix(Launcher): do not detach child process on windows (#2081) Fixes #2053. --- lib/Launcher.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Launcher.js b/lib/Launcher.js index 909bef5a..a8bb9e37 100644 --- a/lib/Launcher.js +++ b/lib/Launcher.js @@ -107,7 +107,10 @@ class Launcher { chromeExecutable, chromeArguments, { - detached: true, + // On non-windows platforms, `detached: false` makes child process a leader of a new + // process group, making it possible to kill child process tree with `.kill(-pid)` command. + // @see https://nodejs.org/api/child_process.html#child_process_options_detached + detached: process.platform !== 'win32', env: options.env || process.env, stdio }