child_process: handle ENOENT correctly on Windows
This commit is contained in:
parent
f9ba9f7bad
commit
323120b5c9
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user