In my case the parent gets killed by the OS with a SIGSEGV due to an unrelated bug (probably in node.js), but the python process python3 .../node_modules/python-bridge/node_python_bridge.py gets left behind running (Linux). I would expect that if the parent process gets killed, the child would also get killed, or else if the parent gets restarted, the existing python process could interfere with the newly created one (by the new node.js parent process).
A working implementation of this can be found in execa:
example:
import {onExit} from 'signal-exit';
const removeExitHandler = onExit(() => {
ps.kill();
});
Would you be interested in this feature? Alternatively switch from child_process to execa and we'd get it for free.
In my case the parent gets killed by the OS with a
SIGSEGVdue to an unrelated bug (probably in node.js), but the python processpython3 .../node_modules/python-bridge/node_python_bridge.pygets left behind running (Linux). I would expect that if the parent process gets killed, the child would also get killed, or else if the parent gets restarted, the existing python process could interfere with the newly created one (by the new node.js parent process).A working implementation of this can be found in
execa:example:
Would you be interested in this feature? Alternatively switch from
child_processtoexecaand we'd get it for free.