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.
This commit is contained in:
Hornwitser committed 2020-03-23 02:38:40 +01:00
1 parent 9f74d7b2ec
commit 1aef3c9609
1 file changed
+3 -1
+3 -1
View File
@@ -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)) {