Permalink
Browse files

child_process.fork: don't overwrite env

thanks to Malte-Thorben Bruns for pointing this out
  • Loading branch information...
1 parent ca4a0fc commit 8c738fa90c137932eb276cef3e48fadf6e56b234 @ry ry committed Oct 10, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/child_process_uv.js
View
3 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);

0 comments on commit 8c738fa

Please sign in to comment.