Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: ignore ENOTCONN on shutdown race with child #1214

Merged
merged 1 commit into from
Mar 28, 2015

Conversation

bnoordhuis
Copy link
Member

On AIX, OS X and the BSDs, calling shutdown() on one end of a pipe
when the other end has closed the connection fails with ENOTCONN.

The sequential/test-child-process-execsync test failed sporadically
because of a race between the parent and the child where one closed
its end of the pipe before the other got around to calling shutdown()
on its end of the pipe.

Libuv is not the right place to handle that because it can't tell if
the ENOTCONN error is genuine but io.js can.

Refs: libuv/libuv#268

R=@piscisaureus, /cc @gireeshpunathil @mdawsonibm

https://jenkins-iojs.nodesource.com/view/iojs/job/iojs+any-pr+multi/347/

@mscdex mscdex added the c++ Issues and PRs that require attention from people who are familiar with C++. label Mar 23, 2015
@piscisaureus
Copy link
Contributor

It's ugly but LGTM @bnoordhuis

@mscdex mscdex added the child_process Issues and PRs related to the child_process subsystem. label Mar 25, 2015
On AIX, OS X and the BSDs, calling shutdown() on one end of a pipe
when the other end has closed the connection fails with ENOTCONN.

The sequential/test-child-process-execsync test failed sporadically
because of a race between the parent and the child where one closed
its end of the pipe before the other got around to calling shutdown()
on its end of the pipe.

Libuv is not the right place to handle that because it can't tell if
the ENOTCONN error is genuine but io.js can.

Refs: libuv/libuv#268
PR-URL: nodejs#1214
Reviewed-By: Bert Belder <bertbelder@gmail.com>
@bnoordhuis bnoordhuis closed this Mar 28, 2015
@bnoordhuis bnoordhuis deleted the fix-execsync-enotconn-race branch March 28, 2015 12:28
@bnoordhuis bnoordhuis merged commit ea37ac0 into nodejs:v1.x Mar 28, 2015
@rvagg rvagg mentioned this pull request Mar 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. child_process Issues and PRs related to the child_process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants