diff options
author | Scott Blomquist <github@scott.blomqui.st> | 2013-02-15 17:25:57 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-03-05 23:47:35 -0800 |
commit | 323120b5c943c0ec04c482c4414c23c01a27f4fc (patch) | |
tree | 9f40234afe106caf96ae834b9dd9dc1040109153 /lib | |
parent | f9ba9f7badf40ad6360526095b7bec8e3319752b (diff) | |
download | android-node-v8-323120b5c943c0ec04c482c4414c23c01a27f4fc.tar.gz android-node-v8-323120b5c943c0ec04c482c4414c23c01a27f4fc.tar.bz2 android-node-v8-323120b5c943c0ec04c482c4414c23c01a27f4fc.zip |
child_process: handle ENOENT correctly on Windows
Diffstat (limited to 'lib')
-rw-r--r-- | lib/child_process.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/child_process.js b/lib/child_process.js index 4a9922e53e..a4a5d2b3a9 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -884,9 +884,9 @@ ChildProcess.prototype.spawn = function(options) { if (stdio.handle) { // when i === 0 - we're dealing with stdin // (which is the only one writable pipe) - stdio.socket = createSocket(stdio.handle, i > 0); + stdio.socket = createSocket(self.pid !== 0 ? stdio.handle : null, i > 0); - if (i > 0) { + if (i > 0 && self.pid !== 0) { self._closesNeeded++; stdio.socket.on('close', function() { maybeClose(self); |