Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

child_process: handle ENOENT correctly on Windows #4780

Closed
wants to merge 1 commit into from
Closed

child_process: handle ENOENT correctly on Windows #4780

wants to merge 1 commit into from

Conversation

sblom
Copy link

@sblom sblom commented Feb 15, 2013

Fixes #4674

Depends on libuv pull request joyent/libuv#713

We were doing all kinds of crazy stuff on Windows when a developer tried to child_process.spawn() a non-existent process.

Now Windows works more like Posix. And passes the child-process unit tests that were previously failing. And we still pass the unit tests on Posix as well.

@@ -882,9 +882,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);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible I should make this more surgical and also check for process.platform === 'win32'.

@isaacs
Copy link

isaacs commented Mar 6, 2013

Ah, sorry for the delay, I thought we were waiting on libuv.

Landed on 323120b. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants