You can try to catch SIGINT in your child:
// child.js process.on("SIGINT", function() { console.log("sigint caught") }); // parent.js var fork = require("child_process").fork, child = fork(__dirname + "/child.js");
Run parent.js and hit ^C Your child.js should continue to run in the background. I do not know what the consequences of this will be during the life of child.js .
Here's an enlightening, albeit fairly old, discussion on a topic on the node.js mailing list .
source share