This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/22145] ttyname() gives up too early in the face of namespaces


https://sourceware.org/bugzilla/show_bug.cgi?id=22145

--- Comment #20 from Luke Shumaker <lukeshu at sbcglobal dot net> ---
> While POSIX does explicitly allow for this case I prefer setting
> errno to a meaningful value on error. I don't like conveying
> information implicitly be it in the error or success case. That's
> best left for cocktail parties in the Oxford common room. :)

It actually doesn't; if isatty(FD) is true, then ttyname(FD) isn't
allowed to fail according to POSIX.  The behavior I described is just
what glibc did :)

I suspect that, prior to your patch, no one in glibc had thought very
seriously about what happens when isatty(FD) is true but ttyname(FD)
has to fail for another reason.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]