bug-gawk
[Top][All Lists]
Advanced

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

Re: fflush & close behavior not well-defined


From: arnold
Subject: Re: fflush & close behavior not well-defined
Date: Wed, 30 Sep 2020 13:05:39 -0600
User-agent: Heirloom mailx 12.5 7/5/10

"Andrew J. Schorr" <aschorr@telemetry-investments.com> wrote:

> Hi,
>
> On Wed, Sep 30, 2020 at 12:08:01PM -0600, arnold@skeeve.com wrote:
> > Ugh.  We may need to have 2 .ok files.  Can you debug why you
> > get that status?  The value I got is death by signal for SIGPIPE
> > (128 + signal number).  You're getting something else...
>
> One line reproducer:
>
> bash-4.2$ ./gawk --lint 'BEGIN {print "hello" |& "cat"; print close("cat")}'
> gawk: cmd. line:1: warning: failure status (269) on two-way pipe close of 
> `cat': Success
> 269
>
> strace shows:
>
> --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=3899, si_uid=300, 
> si_status=SIGPIPE, si_utime=0, si_stime=0} ---

I get:

--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=29075, si_uid=1000, 
si_status=141, si_utime=0, si_stime=0} ---

> > It may be due to differences in glibc.

It seems like my system is lieing to me ...

Arnold



reply via email to

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