about summary refs log tree commit diff
path: root/src/unistd/ttyname_r.c
Commit message (Collapse)AuthorAgeFilesLines
* move and deduplicate declarations of __procfdname to make it checkableRich Felker2018-09-121-2/+1
| | | | | | syscall.h was chosen as the header to declare it, since its intended usage is alongside syscalls as a fallback for operations the direct syscall does not support.
* make ttyname[_r] return ENODEV rather than ENOENTRich Felker2017-04-211-1/+1
| | | | | | | | | | | | | commit 0a950dcf15bb9f7274c804dca490e9e20e475f3e added checking that the pathname a tty device was opened with actually matches the device, which can fail to hold when a container inherits a tty from outside the container. the error code added at the time was ENOENT; however, discussions between affected applications and glibc developers resulted in glibc adopting ENODEV as the error for this condition, and this has now been documented in the man pages project as well. adopt the same error code for consistency. patch by Christian Brauner.
* verify that ttyname refers to the same file as the fdSzabolcs Nagy2016-08-301-4/+11
| | | | | | linux containers use separate mount namespace so the /proc symlink might not point to the right device if the fd was opened in the parent namespace, in this case return ENOENT.
* include cleanups: remove unused headers and add feature test macrosSzabolcs Nagy2013-12-121-2/+0
|
* debloat code that depends on /proc/self/fd/%d with shared functionRich Felker2013-08-021-1/+3
| | | | | | | I intend to add more Linux workarounds that depend on using these pathnames, and some of them will be in "syscall" functions that, from an anti-bloat standpoint, should not depend on the whole snprintf framework.
* fix broken ttyname[_r] (failure to null-terminate result)Rich Felker2012-09-061-1/+4
|
* initial check-in, version 0.5.0 v0.5.0Rich Felker2011-02-121-0/+19