bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH]


From: FERRIEUX Alexandre - IMT/OLN
Subject: Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH]
Date: Sat, 25 Mar 2017 15:48:27 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111113 Thunderbird/8.0

On 25/03/2017 15:39, Andrew J. Schorr wrote:
So the SIGPIPE should be visible in the strace output, regardless of the fact
that gawk is ignoring it, and regardless of the exit status.  I agree that
exiting with 0 success status is a bit deceptive, but I'm less convinced that
we need to mirror the untrapped SIGPIPE 141 exit status...

Ah yes, what I do is strace -e trace=exit_group, looking at the exit statuses.
That is a natural method since all signals are not lethal, so looking at them 
in strace output is more complex.
Exit_group is called just once ;-)

In any case, consider the timeline: old gawk gave a 141 due to the absence of any handler; new gawk (for reasons not entirely clear to me) decides that default handlers are not good enough and intercepts SIGPIPE. It is trivial to make this transparent by writing "exit(128+EPIPE)". What's the point of sticking to a dumb exit(0) or exit(1) ?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]