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: Andrew J. Schorr
Subject: Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH]
Date: Wed, 29 Mar 2017 11:29:41 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Mar 29, 2017 at 05:43:09PM +0300, Eli Zaretskii wrote:
> 4.1.4 produces similar error messages, except that it doesn't exit the
> loop, so it produces many more of them.
> 
> As to whether this result is horrible: I guess it depends on whether
> we want the behavior to be more consistent across platforms.  I'd like
> at least to "fix" errno in this case to be EPIPE, then we can talk
> about what exit status to produce.  Does that make sense?

That makes sense to me. I guess we need some more code snippets like this from
io.c:efwrite:

#ifdef __MINGW32__
        if (errno == 0 || errno == EINVAL)
                w32_maybe_set_errno();
#endif

Perhaps that should be packaged into a macro or inline function. I guess it
will be needed everywhere the code refers to EPIPE.

The good news is that master behaves better than 4.1.4, so it seems like we're
making forward progress, not regressing.

Regards,
Andy



reply via email to

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