Debian Bug report logs - #407454
gawk: bails out with fatal error on getline x < f if f is a dir

version graph

Package: gawk; Maintainer for gawk is Adrian Bunk <bunk@debian.org>; Source for gawk is src:gawk (PTS, buildd, popcon).

Reported by: Paolo <oopla@users.sf.net>

Date: Thu, 18 Jan 2007 15:48:27 UTC

Severity: important

Found in version gawk/1:3.1.5.dfsg-4

Fixed in version gawk/1:3.1.7.dfsg-1

Done: Jeroen Schot <schot@A-Eskwadraat.nl>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, James Troup <james@nocrew.org>:
Bug#407454; Package gawk. (full text, mbox, link).


Acknowledgement sent to Paolo <oopla@users.sf.net>:
New Bug report received and forwarded. Copy sent to James Troup <james@nocrew.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Paolo <oopla@users.sf.net>
To: submit@bugs.debian.org
Subject: gawk: bails out with fatal error on getline x < f if f is a dir
Date: Thu, 18 Jan 2007 16:24:01 +0100
Package: gawk
Version: 1:3.1.5.dfsg-4
Severity: important

hi,

I think gawk does the wrong thing here, and badly since you'd expect to 
catch and handle the situation in the .awk but instead you're kicked out.

According to manpage:

       The  getline command returns 0 on end of file and -1 on an
       error.  Upon an error, ERRNO contains a string  describing
       the problem.

which means that program shouldn't fail, only that return code and ERRNO 
should be set properly.

BTW, the manpage is incomplete wrt getline, it should also mention that 
getline return 1 on normal read - eg:

       The  getline command returns 1 on normal (successful) read, 0 on 
       end of file and -1 on an error.  Upon an error, ERRNO contains a 
       string  describing the problem.

thanks
--
paolo




Reply sent to Jeroen Schot <schot@A-Eskwadraat.nl>:
You have taken responsibility. (Fri, 12 Aug 2011 10:12:24 GMT) (full text, mbox, link).


Notification sent to Paolo <oopla@users.sf.net>:
Bug acknowledged by developer. (Fri, 12 Aug 2011 10:12:28 GMT) (full text, mbox, link).


Message #10 received at 407454-done@bugs.debian.org (full text, mbox, reply):

From: Jeroen Schot <schot@A-Eskwadraat.nl>
To: 407454-done@bugs.debian.org
Subject: Bug#407454 fixed in version 1:3.1.7.dfsg-1
Date: Fri, 12 Aug 2011 12:08:25 +0200
Package: gawk
Version: 1:3.1.7.dfsg-1

This bug has been fixed upstream in release 3.1.7.
The corresponding changelog entry:

> Mon Jan  5 22:48:39 2009  Arnold D. Robbins  <arnold@skeeve.com>
> 
>         * io.c (redirect): A getline from a directory is no longer
>         fatal; instead it returns -1. Thanks to Paolo <oopla@users.sf.net>
>         for the report.

Regards,
-- 
Jeroen Schot




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 10 Sep 2011 07:38:20 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat May 21 11:31:05 2022; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.