about summary refs log tree commit diff
path: root/src/unistd/ctermid.c
Commit message (Collapse)AuthorAgeFilesLines
* simplify ctermidRich Felker2015-01-121-14/+2
| | | | | | | | | | opening /dev/tty then using ttyname_r on it does not produce a canonical terminal name; it simply yields "/dev/tty". it would be possible to make ctermid determine the actual controlling terminal device via field 7 of /proc/self/stat, but doing so would introduce a buffer overflow into applications built with L_ctermid==9, which glibc defines, adversely affecting the quality of ABI compat.
* include cleanups: remove unused headers and add feature test macrosSzabolcs Nagy2013-12-121-2/+0
|
* fix bogus lazy allocation in ctermid and missing malloc failure checkRich Felker2013-07-091-10/+7
| | | | | | also clean up, optimize, and simplify the code, removing branches by simply pre-setting the result string to an empty string, which will be preserved if other operations fail.
* fix fd leak on races and cancellation in ctermidRich Felker2013-07-091-2/+3
|
* initial check-in, version 0.5.0 v0.5.0Rich Felker2011-02-121-0/+23