--- Begin Message ---
Subject: |
suggestion: silently ignore EPIPE errors when SIGPIPE is set to 'ignore' |
Date: |
Mon, 11 Apr 2016 02:36:26 -0400 |
Hello,
This is a small addition to a recent change:
1cec27a7f0e5c7bdc44a88ef51af09f87a8cbc24
grep: use errno consistently in write diagnostics
With the above change, if SIGPIPE is set to 'ignore' (e.g. by the shell or
python),
then grep would exit with "write error: Broken Pipe".
Based on recent suggestion from Pádraig Brady
( http://lists.gnu.org/archive/html/coreutils/2016-04/msg00004.html ) perhaps
it would be better
to have special case for EPIPE and exit silently (as if SIGPIPE was not ignored
and terminated the program?).
Patch attached for such modification.
One issue of which I'm not certain: I assumed that if 'prline' was called, a
match was found.
Thus, EPIPE will result in exit(EXIT_SUCCESS) indicating a match.
Comments welcomed,
- Assaf
0001-grep-silently-ignore-EPIPE-errors.patch
Description: Binary data
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#23267: suggestion: silently ignore EPIPE errors when SIGPIPE is set to 'ignore' |
Date: |
Tue, 22 Sep 2020 15:35:32 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
I'm cleaning up old grep bug reports and am closing this one as wontfix.
--- End Message ---