[PATCH v2] fifo: Do not restart open() if it already found a partner

2012-07-15 Thread Anders Kaseorg
If a parent and child process open the two ends of a fifo, and the child immediately exits, the parent may receive a SIGCHLD before its open() returns. In that case, we need to make sure that open() will return successfully after the SIGCHLD handler returns, instead of throwing EINTR or being

[PATCH v2] fifo: Do not restart open() if it already found a partner

2012-06-26 Thread Anders Kaseorg
If a parent and child process open the two ends of a fifo, and the child immediately exits, the parent may receive a SIGCHLD before its open() returns. In that case, we need to make sure that open() will return successfully after the SIGCHLD handler returns, instead of throwing EINTR or being

Re: [PATCH v2] fifo: Do not restart open() if it already found a partner

2012-06-26 Thread Jonathan Nieder
Anders Kaseorg wrote: Signed-off-by: Anders Kaseorg ande...@mit.edu --- Changes from v1: • Change wait_for_partner return from true/false to 0/-ERESTARTSYS. • Mention that the demo program doesn’t always work for some. • Remove some unneeded braces from the demo program’s CHECK() macro.