cuserid

Returns a pointer to a character string containing the name of the user initiating the current process.

Format

#include  <unistd.h> (X/Open,
          POSIX-1)

#include  <stdio.h> (X/Open)

char *cuserid  (char *str);
Function Variants This function also has variants named _cuserid32 and _cuserid64 for use with 32-bit and 64-bit pointer sizes, respectively. See Section 1.8 for more information on using pointer-size-specific functions.

Argument

str
If this argument is NULL, the user name is stored internally. If the argument is not NULL, it points to a storage area of length L_cuserid (defined by the <stdio.h> header file), and the name is written into that storage. If the user name is a null string, the function returns NULL.

Return Values
pointer  Points to a string. 
NULL  If the user name is a null string. 


Previous Page | Next Page | Table of Contents | Index