From 1aef3c96096e0ae6edcdf7b557f8b5a9bc070503 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Mon, 23 Mar 2020 02:38:40 +0100 Subject: [PATCH] Do not use shell for spawned integration nodes When using the shell for spawning the master and slave integration processes the shell becomes the process that is returned by the spawn command. This in turn means that the SIGINT that was supposed to be sent to the master and slave processes got ignored by the shell instead. Fix by spawning the node process directly instead of through a shell. --- test/integration/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/integration/index.js b/test/integration/index.js index 668a56b4..793e2b87 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -33,7 +33,9 @@ async function exec(...args) { function spawn(name, cmd, waitFor) { return new Promise((resolve, reject) => { - let process = child_process.spawn(cmd, { shell: true }); + console.log(cmd); + let parts = cmd.split(" "); + let process = child_process.spawn(parts[0], parts.slice(1)); let stdout = new server._LineSplitter((line) => { line = line.toString("utf8"); if (line.startsWith(waitFor)) {