|
From: | Assaf Gordon |
Subject: | Re: [bug-gawk] Possible regression in gawk 4.x regarding I/O errors |
Date: | Fri, 25 Jul 2014 17:18:20 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
Hello, On 07/24/2014 03:14 AM, Aharon Robbins wrote:
Interesting test case. I was able to reproduce it. An enormous THANK YOU for the excellent bug report. Here is a patch that doesn't break 'make test'. Let me know if it works for you. Thanks, Arnold ------------------ diff --git a/io.c b/io.c index 57d4af2..c291dc9 100644 --- a/io.c +++ b/io.c @@ -596,6 +596,8 @@ inrec(IOBUF *iop, int *errcode) INCREMENT_REC(NR); INCREMENT_REC(FNR); set_record(begin, cnt); + if (*errcode > 0) + retval = 1; } return retval;
Yes, the above patch fixes the issue. I wonder, though, looking at the above "if" block in the same "inrec" function, should "update_ERRNO_int" also be called? Thanks for the fix! - Assaf
[Prev in Thread] | Current Thread | [Next in Thread] |