mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
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:
1 parent
9f74d7b2ec
commit
1aef3c9609
1 file changed
+3
-1
@@ -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)) {
|
||||
|
||||
Reference in new issue
Block a user