Last active
December 22, 2015 09:18
-
-
Save wavded/6450827 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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