[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23267: suggestion: silently ignore EPIPE errors when SIGPIPE is set
bug#23267: suggestion: silently ignore EPIPE errors when SIGPIPE is set to 'ignore'
Mon, 11 Apr 2016 02:36:26 -0400
This is a small addition to a recent change:
grep: use errno consistently in write diagnostics
With the above change, if SIGPIPE is set to 'ignore' (e.g. by the shell or
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.
Description: Binary data
- bug#23267: suggestion: silently ignore EPIPE errors when SIGPIPE is set to 'ignore',
Assaf Gordon <=