cuserid(3) — Subroutines
OSF
NAME
cuserid − Gets the alphanumeric username associated with the current process
LIBRARY
Standard I/O Package (libc.a)
SYNOPSIS
#include <stdio.h>
char ∗cuserid (
char ∗s );
PARAMETERS
sIf the s parameter is a null pointer, the character string is stored into an internal static area, the address of which is returned. This internal static area is overwritten with the next call to cuserid(). If the s parameter is not a null pointer, the character string is stored into the array pointed to by the s parameter. This array must contain at least L_cuserid bytes. L_cuserid is a constant defined in the stdio.h header file, and has a value greater than 0 (zero).
DESCRIPTION
The cuserid() function generates a character string representing the username of the owner of the current process.
NOTES
AES Support Level:
Full use
RETURN VALUES
If the s parameter is not a null pointer, the cuserid() function returns s. If the s parameter is not a null pointer and the username cannot be found, an empty string is returned.
If the s parameter is a null pointer and the username cannot be found, the cuserid() function returns a null pointer.
The reentrant version of cuserid() always returns null if the argument passed is null.
RELATED INFORMATION
Functions: getlogin(2), getpwent(3)