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

src: ignore ENOTCONN on shutdown race with child #14480

Closed
wants to merge 1 commit into from
Closed

src: ignore ENOTCONN on shutdown race with child #14480

wants to merge 1 commit into from

Conversation

mhdawson
Copy link
Member

@mhdawson mhdawson commented Apr 6, 2015

This is a backport of ea37ac0

Original commit message:

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: iojs#1214
Reviewed-By: Bert Belder bertbelder@gmail.com

Fixes: joyent#9444.

@misterdjules
Copy link

LGTM. Ideally we would slightly change this commit message to specify that this change is ported from io.js, like with 61fe1fe. Thank you @mdawsonibm!

This is a backport of ea37ac0

Original commit message:

  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: iojs#1214
  Reviewed-By: Bert Belder <bertbelder@gmail.com>

Fixes: #9444.
mhdawson pushed a commit that referenced this pull request Apr 13, 2015
This is a backport of ea37ac0

Original commit message:

  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: iojs#1214
  Reviewed-By: Bert Belder <bertbelder@gmail.com>

Fixes: #9444.

Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: #14480
@mhdawson
Copy link
Member Author

Landed as d5b3224

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

Successfully merging this pull request may close these issues.

5 participants