bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: [bug?] getline is not fatal when posix is forced


From: Seb
Subject: Re: [bug?] getline is not fatal when posix is forced
Date: Tue, 2 Dec 2008 19:04:53 +0100

Le Sun, 30 Nov 2008 23:35:02 +0200
Aharon Robbins <address@hidden> a écrit:

> Hi. You have found a bug in the documentation.  I'm not sure why I thought
> getline in posix mode on a non-existant or unreadable file was fatal,
> but neither mawk, nawk, nor gawk treat it that way.

Ok, hence in all cases this way to proceed (the most effiscient) is pratically
portable . :)

> I will double check the standard, but I think the documentation is just
> wrong and I'll fix it.

Thanks. I glanced at this:

  http://www.opengroup.org/onlinepubs/009695399/utilities/awk.html

It is only said that getline() returns "-1" when it encounters an error. So,
effectively, it would be weird to define a standard value to return without
letting any possibility to deal with it.

++
Seb




reply via email to

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