cuserid
Purpose
Gets the alphanumeric user name associated with the
current process.
Library
Standard I/O Library (libc.a)
Syntax
#include <stdio.h>
char *cuserid (s)
char *s;
Description
The cuserid subroutine generates a character string
representing the user name of the owner of the current
process.
If the s parameter is a NULL pointer, then the character
string is stored into an internal static area, the
address of which is returned.
If the s parameter is not a NULL pointer, then the char-
acter string is stored into the array pointed to by the s
parameter. This array must contain at least L_cuserid
characters. L_cuserid is a constant defined in the
stdio.h header file.
If the user name cannot be found, the cuserid subroutine
returns a NULL pointer; if the s parameter is not a NULL
pointer, then a null character ("'\0'") is stored into
s[0].
Related Information
In this book: "getlogin," "getpwent, getpwuid, getpwnam,
setpwent, endpwent," and "standard i/o library."