bug-gnulib
[Top][All Lists]
Advanced

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

Re: isatty() and errno


From: Paul Eggert
Subject: Re: isatty() and errno
Date: Tue, 08 Nov 2011 09:07:32 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0

On 11/08/11 03:33, Bruno Haible wrote:

> The fact that isatty() always sets errno in glibc is undocumented:

Amusingly enough, this *is* documented in the GNU/Linux man page
<http://www.kernel.org/doc/man-pages/online/pages/man3/isatty.3.html>:

       isatty() returns 1 if fd is an open file descriptor referring to a 
terminal;
       otherwise 0 is returned, and errno is set to indicate the error.

So in this case we have dueling documentation.

If I were writing the code I would just leave gnulib alone, as Bruno suggests,
but I find it hard to argue against a more activist approach
in which gnulib supports the documented GNU/Linux behavior.



reply via email to

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