I have a Node.js application that spawns child processes. Each child process is a sudo command in which there is an application under it. If I use child_process.kill ("SIGTERM"), the sudo command ends, but its child application continues to work and consumes a lot of CPU (most likely, because of this, STDID / STDOUT becomes disabled). How to kill all child processes (tree) when using child_process in Node.js?
source share