Skip to content

Instantly share code, notes, and snippets.

@wavded
Last active December 22, 2015 09:18
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 wavded/6450827 to your computer and use it in GitHub Desktop.
Save wavded/6450827 to your computer and use it in GitHub Desktop.
// works
var fs = require('fs'),
spawn = require('child_process').spawn,
out = fs.openSync('./out.log', 'a'),
err = fs.openSync('./out.log', 'a');
var child = spawn('prg', [], {
detached: true,
stdio: [ 'ignore', out, err ]
});
child.unref();
// stderr doesn't seem to get written out
var fs = require('fs'),
spawn = require('child_process').spawn,
out = fs.openSync('./out.log', 'a');
var child = spawn('prg', [], {
detached: true,
stdio: [ 'ignore', out, out ]
});
child.unref();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment