[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] bug report on PROCINFO[,"READ_TIMEOUT"]
From: |
Alejandro Mendoza |
Subject: |
[bug-gawk] bug report on PROCINFO[,"READ_TIMEOUT"] |
Date: |
Tue, 05 May 2015 15:00:04 -0500 |
User-agent: |
Thunderbird 2.0.0.18 (X11/20081105) |
Hi,
I just encountered a bug with the PROCINFO[,"READ_TIMEOUT"] feature.
It happens in version 4.1.1 and 4.1.10, running under slackware linux
4.x. I have not tested gawk version 4.1.2 since I haven't upgraded it.
If a timeout occurs on reading (stdin, file or network), a subsequent
reading aborts immediately (no timeout), even after changing the timeout
value.
The bug is very simple to replicate, this very short code typed at the
command line can show it:
awk 'BEGIN {infile="/dev/stdin"; PROCINFO[infile,"READ_TIMEOUT"]=2000;
getline < infile; print "read 1: " $0; print "next input"; $0="";
PROCINFO[infile,"READ_TIMEOUT"]="5000";getline <infile; print "read 2: "
$0}'
If I let the first read to time out, the second aborts immediately (even
if I set it to 0 to wait forever). If I type something and hit <enter>
before timing out, the second read works as it should.
Best Regards,
--
Alex Mendoza
- [bug-gawk] bug report on PROCINFO[,"READ_TIMEOUT"],
Alejandro Mendoza <=
- Re: [bug-gawk] bug report on PROCINFO[,"READ_TIMEOUT"], Andrew J. Schorr, 2015/05/05
- Re: [bug-gawk] bug report on PROCINFO[,"READ_TIMEOUT"], Andrew J. Schorr, 2015/05/05
- Re: [bug-gawk] bug report on PROCINFO[,"READ_TIMEOUT"], Aharon Robbins, 2015/05/06
- Message not available
- Message not available
- Message not available
- Re: [bug-gawk] bug report on PROCINFO[,"READ_TIMEOUT"], Andrew J. Schorr, 2015/05/07
- Re: [bug-gawk] bug report on PROCINFO[,"READ_TIMEOUT"], Aharon Robbins, 2015/05/11
- Re: [bug-gawk] bug report on PROCINFO[,"READ_TIMEOUT"], Andrew J. Schorr, 2015/05/11
- Re: [bug-gawk] bug report on PROCINFO[,"READ_TIMEOUT"], Aharon Robbins, 2015/05/14
- Re: [bug-gawk] bug report on PROCINFO[,"READ_TIMEOUT"], Eli Zaretskii, 2015/05/15