|
|
@ -49,7 +49,15 @@ export class DeferedSpawn extends Emittery {
|
|
|
|
|
|
|
|
|
|
|
|
kill() {
|
|
|
|
kill() {
|
|
|
|
console.log("killing process!", this.process.spawnargs.join(" "));
|
|
|
|
console.log("killing process!", this.process.spawnargs.join(" "));
|
|
|
|
process.kill(-this.process.pid); // https://stackoverflow.com/a/49842576
|
|
|
|
try {
|
|
|
|
|
|
|
|
process.kill(-this.process.pid); // https://stackoverflow.com/a/49842576
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
console.log(
|
|
|
|
|
|
|
|
"Didn't kill process",
|
|
|
|
|
|
|
|
this.process.spawnfile,
|
|
|
|
|
|
|
|
", maybe it was killed already"
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
write(data: string) {
|
|
|
|
write(data: string) {
|
|
|
|