This is the mail archive of the
mailing list for the glibc project.
[Bug libc/22145] ttyname() gives up too early in the face of namespaces
- From: "lukeshu at sbcglobal dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 10 Oct 2017 17:49:30 +0000
- Subject: [Bug libc/22145] ttyname() gives up too early in the face of namespaces
- Auto-submitted: auto-generated
- References: <email@example.com/bugzilla/>
--- 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.