[PATCH] grantpt errno values

Andreas Schwab schwab@suse.de
Tue Dec 11 01:10:00 GMT 2001


Thorsten Kukuk <kukuk@suse.de> writes:

|> But the Austin draft writes something other about isatty:
|> 
|> 20762 RETURN VALUE
|> 20763              The isatty( ) function shall return 1 if fildes is associated
|>  with a terminal; otherwise, it shall return
|> 20764              0 and may set errno to indicate the error.
                            ^^^^^^^
|> 
|> 20765 ERRORS
|> 20766              The isatty( ) function may fail if:
|> 20767              [EBADF]              The fildes argument is not a valid open 
|> file descriptor.
|> 20768              [ENOTTY]             The fildes argument is not associated wi
|> th a terminal.
|> 
|> I would say, if the file descriptor is not valid, errno has to be EBADF
|> and ENOTTY if it is not associated with a TTY.

isatty is not _required_ to set errno, only if it does it should have the
indicated values.

Andreas.

-- 
Andreas Schwab                                  "And now for something
Andreas.Schwab@suse.de				completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5



More information about the Libc-hacker mailing list