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: Andrew J. Schorr
Subject: Re: fflush & close behavior not well-defined
Date: Wed, 30 Sep 2020 15:22:56 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Sep 30, 2020 at 01:05:39PM -0600, arnold@skeeve.com wrote:
> "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 ...

That's really strange. I tested on Fedora 32 as well, and that gives 269.

Regards,
Andy



reply via email to

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