Skip to content

Instantly share code, notes, and snippets.

@FLYBYME
Created June 16, 2012 21:19
Show Gist options
  • Save FLYBYME/2942524 to your computer and use it in GitHub Desktop.
Save FLYBYME/2942524 to your computer and use it in GitHub Desktop.
var util = require('util')
var spawn = require('child_process').spawn
var fs = require('fs')
var out = fs.createWriteStream('./out.log', {
flags : 'a',
encoding : null,
mode : 0666
})
var child = spawn(process.execPath, [__dirname + '/fork-cp.js'], {
//silent : false,
stdio : 'ipc'
});
child.on('exit', function(code) {
console.log('ps process exited with code ' + code);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment