Index of Section 3 Manual Pages
| Interix / SUA | cuserid.3 | Interix / SUA |
cuserid(3) cuserid(3)
cuserid()
NAME
cuserid() - return user ID (login name) as a string
SYNOPSIS
#include
char * cuserid (char *s)
DESCRIPTION
The cuserid(3) function returns the login name of the real owner of the
process.
If s is NULL, then the function returns a pointer to a static buffer,
which may be overwritten by subsequent calls to cuserid(3). Consequently,
this function is thread safe only if the s argument is not NULL.
If s is not NULL, it's assumed to be a buffer that is at least {L_cuserid}
bytes long; {L_cuserid} is defined in .
RETURNS
If s is not NULL, cuserid(3) returns s; if s is NULL, cuserid(3) returns a
pointer to an internal buffer.
If the login name was found, it will be in the appropriate buffer. If the
login name could not be found, the buffer contains a null byte `\0'.
SEE ALSO
getlogin(2)
getpwnam(2)
getpwuid(2)
getuid(2)
geteuid(2)
USAGE NOTES
The cuserid function is thread safe.
The cuserid function is not async-signal safe.