var spawn = exports.spawn = function(file, args, options) {
- var child = new ChildProcess();
-
var args = args ? args.slice(0) : [];
args.unshift(file);
envPairs.push(key + '=' + env[key]);
}
+ var child = new ChildProcess();
+
child.spawn({
file: file,
args: args,
cwd: options ? options.cwd : null,
windowsVerbatimArguments: !!(options && options.windowsVerbatimArguments),
- envPairs: envPairs
+ envPairs: envPairs,
+ customFds: options ? options.customFds : null
});
return child;