Kill subprocess if local end of connection closes
This commit is contained in:
parent
f92923567e
commit
7c70fa74fe
|
@ -57,7 +57,12 @@ spawn named 'driver/Subprocess' {
|
||||||
sp.off('error', rejecter);
|
sp.off('error', rejecter);
|
||||||
send S.ConnectionAccepted(id);
|
send S.ConnectionAccepted(id);
|
||||||
const s = new Duplex(sp.stdout, sp.stdin);
|
const s = new Duplex(sp.stdout, sp.stdin);
|
||||||
establishingFacet.stop(() => { react S.duplexStreamBehaviour(id, s); });
|
establishingFacet.stop(() => {
|
||||||
|
react {
|
||||||
|
S.duplexStreamBehaviour(id, s);
|
||||||
|
on stop try { sp.kill('SIGHUP'); } catch (e) {}
|
||||||
|
}
|
||||||
|
});
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue