bug-gawk
[Top][All Lists]
Advanced

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

Re: Reading /dev/stdin Input with a Timeout


From: arnold
Subject: Re: Reading /dev/stdin Input with a Timeout
Date: Mon, 25 Dec 2023 13:28:30 -0700
User-agent: Heirloom mailx 12.5 7/5/10

I've applied Andy's patch. It'll be in Git shortly.

Thanks everyone,

Arnold

arnold@skeeve.com wrote:

> Actually, Andy's patch does the same thing. I'll take a closer look
> before I make any commits.
>
> Arnold
>
> arnold@skeeve.com wrote:
>
> > Hi All.
> >
> > Sorry for the long delay in replying. I think I prefer the attached patch.
> > I will try to get it into Git in the next day or so.
> >
> > Thanks,
> >
> > Arnold
> >
> > "Andrew J. Schorr" <aschorr@telemetry-investments.com> wrote:
> >
> > > Hi,
> > >
> > > I think the attached patch fixes this, but I fear that I may be missing
> > > something subtle about how GAWK_READ_TIMEOUT is supposed to work, because 
> > > I
> > > can't fathom why it was coded the other way previously...
> > >
> > > Regards,
> > > Andy
> > >
> > > On Thu, Dec 14, 2023 at 07:02:58AM -0600, Ed Morton wrote:
> > > > Though this doesn't work:
> > > > 
> > > >    GAWK_READ_TIMEOUT=1000 gawk '
> > > >         { print "You entered: " $0 }
> > > >    '
> > > > 
> > > > this does:
> > > > 
> > > >    GAWK_READ_TIMEOUT=1000 gawk '
> > > >         BEGIN {
> > > >             if ( !("-","READ_TIMEOUT") in PROCINFO ) {
> > > >                 PROCINFO["-","READ_TIMEOUT"] = 
> > > > ENVIRON["GAWK_READ_TIMEOUT"]
> > > >             }
> > > >         }
> > > >         { print "You entered: " $0 }
> > > >    '
> > > >    gawk: cmd. line:4: fatal: error reading input file `-': Connection
> > > >    timed out
> > > > 
> > > > so there's a workaround, though it seems like a fix should be
> > > > possible for this GAWK_READ_TIMEOUT problem (which is apparently
> > > > different from John's original PROCINFO["-","READ_TIMEOUT"]  MinGW
> > > > problem).
> > > > 
> > > >     Ed.
> >



reply via email to

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