Browse Source

child_process.fork: don't overwrite env

thanks to Malte-Thorben Bruns for pointing this out
v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
8c738fa90c
  1. 3
      lib/child_process_uv.js

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);

Loading…
Cancel
Save