|
|
@ -185,7 +185,7 @@ ChildProcess.prototype.kill = function(sig) { |
|
|
|
ChildProcess.prototype.spawn = function(path, args, options, customFds) { |
|
|
|
args = args || []; |
|
|
|
|
|
|
|
var cwd, env, setuid; |
|
|
|
var cwd, env, setsid; |
|
|
|
if (!options || options.cwd === undefined && |
|
|
|
options.env === undefined && |
|
|
|
options.customFds === undefined) { |
|
|
@ -193,13 +193,13 @@ ChildProcess.prototype.spawn = function(path, args, options, customFds) { |
|
|
|
cwd = ''; |
|
|
|
env = options || process.env; |
|
|
|
customFds = customFds || [-1, -1, -1]; |
|
|
|
setuid = false; |
|
|
|
setsid = false; |
|
|
|
} else { |
|
|
|
// Recommended API: (path, args, options)
|
|
|
|
cwd = options.cwd || ''; |
|
|
|
env = options.env || process.env; |
|
|
|
customFds = options.customFds || [-1, -1, -1]; |
|
|
|
setuid = options.setuid ? true : false; |
|
|
|
setsid = options.setsid ? true : false; |
|
|
|
} |
|
|
|
|
|
|
|
var envPairs = []; |
|
|
@ -214,7 +214,7 @@ ChildProcess.prototype.spawn = function(path, args, options, customFds) { |
|
|
|
cwd, |
|
|
|
envPairs, |
|
|
|
customFds, |
|
|
|
setuid); |
|
|
|
setsid); |
|
|
|
this.fds = fds; |
|
|
|
|
|
|
|
if (customFds[0] === -1 || customFds[0] === undefined) { |
|
|
|