Archived
1
0

Get search working and clean up disconnected client (#23)

* Use ipc instead of pipe

* Run callback passed to child process's send method

* It also returns true

* Correct send signature

* Kill processes when client disconnects
This commit is contained in:
Asher
2019-01-29 18:23:30 -06:00
committed by Kyle Carberry
parent b4798d1a48
commit 3a88ae5fb2
6 changed files with 49 additions and 31 deletions

View File

@ -15,7 +15,7 @@ describe("spawn", () => {
workingDirectory: "",
forkProvider: (msg): cp.ChildProcess => {
return cp.spawn(msg.getCommand(), msg.getArgsList(), {
stdio: [null, null, null, "pipe"],
stdio: [null, null, null, "ipc"],
});
},
});
@ -144,7 +144,7 @@ describe("spawn", () => {
expect(msg.bananas).toBeTruthy();
proc.kill();
});
proc.send({ bananas: true }, true);
proc.send({ bananas: true }, undefined, true);
proc.on("exit", () => done());
});
});