Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@AvianFlu
Created February 21, 2012 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AvianFlu/ce20858d1bab6d553aec to your computer and use it in GitHub Desktop.
Save AvianFlu/ce20858d1bab6d553aec to your computer and use it in GitHub Desktop.
detached child processes
var spawn = require('child_process').spawn;
var child = spawn('node', ['server.js'], {
detached: true
});
child.on('detached', function (pid) {
console.log('Child detached, pid: %d', pid);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment