-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
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:
- https://github.com/sindresorhus/execa/blob/main/docs/termination.md#current-process-exit
- https://github.com/sindresorhus/execa/blob/cbe805c72ddcff932d8c37bb1910aa6864099cea/lib/terminate/cleanup.js#L10
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.
Metadata
Metadata
Assignees
Labels
No labels