I need to kill the process tree in 5 seconds. However, I found that the code will run almost 10+ seconds before returned. Any suggestions? Thanks.
const fkill = require('fkill');
...
await fkill(pid, {"force": true, "tree": true}); // It takes longer than expected
I need to kill the process tree in 5 seconds. However, I found that the code will run almost 10+ seconds before returned. Any suggestions? Thanks.