Commit e7d50f1
committed
Process: only close the read end of the pipe after reading the full content successfully
If we close the read end of the pipe after hitting an error (EIO for example),
the child process may be still running and will print more content into the write end of the
pipe. Such write to a closed-read pipe will cause a SIGPIPE signal and fail.
Potentiall a fix to rdar://740581131 parent 2954e55 commit e7d50f1
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
614 | 622 | | |
615 | 623 | | |
616 | 624 | | |
| |||
621 | 629 | | |
622 | 630 | | |
623 | 631 | | |
624 | | - | |
625 | | - | |
626 | 632 | | |
627 | 633 | | |
628 | 634 | | |
| |||
0 commit comments