diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-10-10 14:49:02 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-10-10 14:49:02 -0700 |
commit | 8c738fa90c137932eb276cef3e48fadf6e56b234 (patch) | |
tree | d016a599ceb47149affb8088060db0ffd9d1c9bc | |
parent | ca4a0fce658da9fc0a0fea95eb3d651f66d62bb6 (diff) | |
download | node-new-8c738fa90c137932eb276cef3e48fadf6e56b234.tar.gz |
child_process.fork: don't overwrite env
thanks to Malte-Thorben Bruns for pointing this out
-rw-r--r-- | lib/child_process_uv.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/child_process_uv.js b/lib/child_process_uv.js index da712a4d31..f2a1a7fdd1 100644 --- a/lib/child_process_uv.js +++ b/lib/child_process_uv.js @@ -140,7 +140,8 @@ exports.fork = function(modulePath, args, options) { // Just need to set this - child process won't actually use the fd. // For backwards compat - this can be changed to 'NODE_CHANNEL' before v0.6. - options.env = { NODE_CHANNEL_FD: 42 }; + if (!options.env) options.env = { }; + options.env.NODE_CHANNEL_FD = 42; // stdin is the IPC channel. options.stdinStream = createPipe(true); |