HackPi
HackPi copied to clipboard
Kill child_processes on demand
I found an example of how to do it but directly:
var proc = require('child_process').spawn('mongod');
proc.kill('SIGINT');
But we need to kill it globally, so we need to setup the global tracking array system first, then append the process variable to it so we can kill it on demand. #3