Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Forward customFds to ChildProcess.spawn
Browse files Browse the repository at this point in the history
Fixes #1695
  • Loading branch information
ry committed Sep 14, 2011
1 parent d2dadf3 commit 7096600
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/child_process_uv.js
Expand Up @@ -195,8 +195,6 @@ exports.execFile = function(file /* args, options, callback */) {


var spawn = exports.spawn = function(file, args, options) {
var child = new ChildProcess();

var args = args ? args.slice(0) : [];
args.unshift(file);

Expand All @@ -207,12 +205,15 @@ var spawn = exports.spawn = function(file, args, options) {
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;
Expand Down

0 comments on commit 7096600

Please sign in to comment.