diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2012-05-16 23:04:24 +0700 |
---|---|---|
committer | Fedor Indutny <fedor.indutny@gmail.com> | 2012-06-01 20:52:13 +0400 |
commit | af98fc9d5f20a8c5dc0db95121f18355337762f1 (patch) | |
tree | 26348c986cec965b3f6c34edcd1d9a743aa4c106 /src/node.js | |
parent | 30a0e58d63a8fb48ee47472a52450539e0656df9 (diff) | |
download | node-af98fc9d5f20a8c5dc0db95121f18355337762f1.tar.gz |
child_process: new stdio API for .spawn() method
Diffstat (limited to 'src/node.js')
-rw-r--r-- | src/node.js | 5 |
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); } } |