[Top][All Lists]

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

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

From: Andrew J. Schorr
Subject: Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH]
Date: Sun, 26 Mar 2017 10:39:42 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Mar 26, 2017 at 02:43:09AM -0600, address@hidden wrote:
> Handling non-fatal stuff has complicated things more than I expected.

FYI, the decision to ignore SIGPIPE was taken long before non-fatal support was
added. According to the ChangeLog:

2013-10-17         Arnold D. Robbins     <address@hidden>

        * main.c (main): Ignore SIGPIPE. See the comment in the code.
        Thanks to Alan Broder for reporting the issue.

The non-fatal stuff was added over a year later at the end of 2014.
At the time, the comment in the patch to main.c said:

#ifdef SIGPIPE
         * Ignore SIGPIPE so that writes to pipes that fail don't
         * kill the process but instead return -1 and set errno.
         * That lets us print a fatal message instead of dieing suddenly.
        signal(SIGPIPE, SIG_IGN);

That being said, I think the non-fatal feature is a good one and justifies
getting this right.


reply via email to

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