![]() |
![]()
| ![]() |
![]()
NAMExt_get_user_name() - Get username of process owner LIBRARY#include <xtend/proc.h> -lxtend SYNOPSISchar *xt_get_user_name(char *user_name, size_t maxlen) ARGUMENTSuser_name: Character buffer to receive home directory path maxlen: Max characters to copy to dir, not including null byte DESCRIPTIONxt_get_user_name() determines the user name of the process owner. The information is retrieved using a call to getpwuid(3), and copied to the argument "dir". The name is stored in user_name up to maxlen characters. Note that up to maxlen characters are stored, not including the null terminator, hence the buffer should be at least maxlen+1 bytes long. RETURN VALUESA pointer to user_name, or NULL upon failure. SEE ALSOgetuid(3), getpwuid(3)
|