I am looking for a way to kill all child processes spawned when my parent process die (including by receiving SIGKILL).
PM2 process manager seems to have the key, because sending a SIGKILL to pm2 Daemon causes all child processes to exit (on Linux platform).
So do you know how PM2 achieve this ? how can I reproduce this behavior ?
Thanks !