summaryrefslogtreecommitdiff
path: root/src/node.js
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2012-05-16 23:04:24 +0700
committerFedor Indutny <fedor.indutny@gmail.com>2012-06-01 20:52:13 +0400
commitaf98fc9d5f20a8c5dc0db95121f18355337762f1 (patch)
tree26348c986cec965b3f6c34edcd1d9a743aa4c106 /src/node.js
parent30a0e58d63a8fb48ee47472a52450539e0656df9 (diff)
downloadnode-af98fc9d5f20a8c5dc0db95121f18355337762f1.tar.gz
child_process: new stdio API for .spawn() method
Diffstat (limited to 'src/node.js')
-rw-r--r--src/node.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/node.js b/src/node.js
index fd5c6760b..ba0786d6e 100644
--- a/src/node.js
+++ b/src/node.js
@@ -482,7 +482,8 @@
// If we were spawned with env NODE_CHANNEL_FD then load that up and
// start parsing data from that stream.
if (process.env.NODE_CHANNEL_FD) {
- assert(parseInt(process.env.NODE_CHANNEL_FD) >= 0);
+ var fd = parseInt(process.env.NODE_CHANNEL_FD, 10);
+ assert(fd >= 0);
// Make sure it's not accidentally inherited by child processes.
delete process.env.NODE_CHANNEL_FD;
@@ -494,7 +495,7 @@
// FIXME is this really necessary?
process.binding('tcp_wrap');
- cp._forkChild();
+ cp._forkChild(fd);
assert(process.send);
}
}