forked from cpan-authors/IPC-Run
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Retry _read() on EINTR, instead of losing pipe contents.
By not retrying, EINTR behaved like EOF. In other words, EINTR had consequences like the write side (kid side) closing the pipe early. Symptoms depended on the _read() caller. When $pipe_reader conflated EINTR with pipe closure, symptoms were application-specific. When _spawn reading the internal "sync pipe" conflated EINTR with pipe closure, the parent would fail to report exec failure. Add a test for the loss of exec failure report. The $pipe_reader problem is much tougher to test, because $pipe_reader only tries read() if select() found data available. Hence, the signal needs to arrive in the narrow window after read() enters the kernel, before read() returns already-available data. The issue report reproduced that on macOS only. Fixes cpan-authors#176
- Loading branch information
Showing
2 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters