bug-gawk
[Top][All Lists]
Advanced

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

Re: Ignored SIGPIPE with line bufferization (wrapped by 'stdbuf -oL')


From: Nikita Zlobin
Subject: Re: Ignored SIGPIPE with line bufferization (wrapped by 'stdbuf -oL')
Date: Fri, 29 Jul 2022 15:23:16 +0500

In Fri, 29 Jul 2022 15:14:35 +0500
Nikita Zlobin <cook60020tmp@mail.ru> wrote:

> In Thu, 28 Jul 2022 18:04:06 -0400
> "Andrew J. Schorr" <aschorr@telemetry-investments.com> wrote:
> 
> > Hi,
...
> > Thanks for the report. This is interesting. Based on some
> > preliminary investigation, it seems to me that builtin.c:do_print
> > calls efwrite to print the message, and builtin.c:efwrite calls
> > fwrite to send the caracters to stdout, and the problem is that
> > fwrite is not reporting any error back to gawk. So the question is
> > what is stdbuf doing that causes fwrite to return success despite
> > the fact that it's writing to a broken pipe. This might be a glibc
> > bug. Or I haven't had enough coffee today.
> 
> write writes to fd, while fwrite - to FILE stream, where streams are
> on top of descriptors. I guess, this difference could be reason.

Err, I did not notice, that there's no word about write call. I just saw
it in strace output and probably, treated that in wrong way. Yet FILE
streams are those things, for which setbuf is applied, lol.



reply via email to

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