10.69.39 getlogin
¶
POSIX specification:
https://pubs.opengroup.org/onlinepubs/9799919799/functions/getlogin.html
Gnulib module: getlogin
Portability problems fixed by Gnulib:
- This function is missing on some platforms:
older mingw, MSVC 14.
- This function is not declared unless
_POSIX
is defined on some platforms:
mingw.
- This function returns the value of the
LOGNAME
environment variable
and this therefore arbitrarily fakeable:
musl libc 1.2.5.
Portability problems not fixed by Gnulib:
- This function returns an empty string even when standard input is a tty
on some platforms:
HP-UX 11.11.
- When there are several user names with the same user ID,
this function may return, instead of the user name that logged in,
another user name that has the same user ID, on some platforms:
Linux and others.