GNU bug report logs -
#17981
[PATCH] maint.mk: less syntax-check noise when SIGPIPE is ignored
Previous Next
Reported by: Eric Blake <eblake <at> redhat.com>
Date: Wed, 9 Jul 2014 23:47:02 UTC
Severity: wishlist
Tags: patch
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 07/08/2014 12:42 PM, Eric Blake wrote:
> It is unclear
> at this point whether POSIX would recommend that filter
> applications should_always_ exit with 0 status on pipe failure,
> or only do this for EPIPE write failures when SIGPIPE is ignored,
> or whether it should be optional behavior that must be explicitly
> enabled via a command-line option and/or system-wide environment
> variable.
None of these options sound appealing, I'm afraid. The first two would
be an incompatible change to longstanding standard behavior. A
system-wide environment variable would be problematic for all the usual
reaosns. A command-line option would be a pain to use (what? I have to
modify all my shell scripts?).
Instead, how about this idea? Change the behavior of the shell so that
SIGPIPE is not ignored in a pipeline (except in the pipeline's last
member of course), even if it is ignored in the parent. This is also a
change to POSIX, but it's a relatively minor one. Or, if we want to be
conservative about it, we could make the new behavior depend on a new
shell option. Either way, this would solve the problem without having
to change grep, sed, etc.
We might also want to have a way to reenable traps in the shell when
they're disabled; that's been a longstanding problem even aside from
this SIGPIPE business.
This bug report was last modified 4 years and 258 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.