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 23:48:05 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111113 Thunderbird/8.0

On 25/03/2017 20:21, Andrew J. Schorr wrote:
On Sat, Mar 25, 2017 at 08:16:08PM +0100, FERRIEUX Alexandre - IMT/OLN wrote:
 OK, so, on behalf of the worst behavior (of a few non-posix oddball
 OSes), you'd rather sacrifice the unix instance of ... awk ? All of
 this for a "hard to maintain" 3-liner
..
 # define SIGPIPE_EXIT_CODE   1 /* my OS is too dumb to tolerate more than one 
bit here *:
...
 Seriously...

No need to get snippy. We are discussing the best way to resolve this issue.
You obviously feel very strongly that the fate of humanity depends on the 141
exit code from a broken pipe. I personally never check the exit code other than
for success (zero) vs failure (non-zero).


Apologies for the tone. It's just that taking Windows as a limiting factor gets 
me nervous.

Of course the 141 vs 1 is no big deal. But if it comes for free, what about it ?

By "for free" I mean an #ifdef appropriate to cover all of true unix. Something 
like

        #ifdef unix
        # define SIGPIPE_EXIT_CODE (128|SIGPIPE)
        #else
        # define SIGPIPE_EXIT_CODE 1
        #endif



reply via email to

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