mirror of
https://sourceware.org/git/glibc.git
synced 2025-10-28 23:34:53 +03:00
The old implementation uses fd 0 to determine the login TTY. This was needed because using /dev/tty it is not possible to deduce the login TTY. For some time now there is the pseudo-file /proc/self/loginuid which directly helps us to find the user. Prefer using this file. It also works if stdin is closed, redirected, or re-opened.