cuserid(3s) [ultrix man page]
cuserid(3s) cuserid(3s) Name cuserid - get character login name of the user Syntax #include <stdio.h> char *cuserid (s) char *s; Description The subroutine generates a character-string representation of the login name of the owner of the current process. If s is a NULL pointer, this representation is generated in an internal static area, the address of which is returned. Otherwise, s is assumed to point to an array of at least characters; the representation is left in this array. The constant is defined in the <stdio.h> header file. Return Values If the login name cannot be found, returns a NULL pointer; if s is not a NULL pointer, a null character ( ) will be placed at s[0]. In POSIX mode, if s is not a NULL pointer, s is the return value. Environment When your program is compiled using the POSIX environment, returns the name associated with the effective userid of the calling process. When compiled in the BSD or System V environments, it returns the name associated with the login activity on the controlling terminal, if any. Otherwise, it returns the same as in the POSIX environment. See Also getlogin(3), getpwent(3) cuserid(3s)
Check Out this Related Man Page
cuserid(3) Library Functions Manual cuserid(3) NAME
cuserid - Gets the alphanumeric username associated with the current process LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <stdio.h> char *cuserid( char *s); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: cuserid(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Points to the character array into which the cuserid() function copies the string representing the username. 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). If you specify a null pointer for s, the character string is stored into an internal thread-specific buffer, the address of which is returned. DESCRIPTION
The cuserid() function generates a character string representing the real or effective username of the owner of the current process. NOTES
If the s parameter is a null pointer, the character string is stored into an internal thread-specific buffer, the address of which is returned. Subsequent calls to the cuserid() function from the same thread overwrite the contents of the internal buffer. The cuserid() function is scheduled to be withdrawn from a future version of the X/Open CAE Specification. RETURN VALUES
If the s parameter is not a null pointer, the cuserid() function returns the character string in the array pointed to by s. If the user- name cannot be found, an empty string is returned. If the s parameter is a null pointer, the character string is stored into an internal thread-specific buffer, the address of which is returned. If the username cannot be found, a null pointer is returned. RELATED INFORMATION
Functions: getlogin(2), getpwent(3) Standards: standards(5) delim off cuserid(3)