Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/getlogin_r.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/getlogin_r.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/getlogin_r.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/getlogin_r.html on line 8
Get the user name associated with the calling process
#include <unistd.h>
int getlogin_r( char* name,
size_t namesize );
- name
- A buffer where the function can store the user name.
- namesize
- The size of the buffer.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
|
This function is in libc.a, but not in libc.so
(in order to save space). |
If _POSIX_THREAD_SAFE_FUNCTIONS is defined, the
getlogin_r() function puts the login name of the user
associated with the calling process in the character array pointed to by
name. The array is namesize characters long and
should have space for the name and the terminating NULL
character. The maximum size of the login name is
_POSIX_LOGIN_NAME_MAX.
If getlogin_r() is successful, name points to
the name the user used at login, even if there are several login names
with the same user ID.
- EOK
- Success.
- ERANGE
- Insufficient storage was supplied via the name
and namesize arguments to contain the user's name.
POSIX 1003.1 TSF
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |
getlogin(),
getpwnam(),
getpwnam_r(),
getpwuid(),
getpwuid_r()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/g/getlogin_r.html on line 151
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/g/getlogin_r.html on line 151