getlogin(3C)
_________________________________________________________________
getlogin function
Return a byte pointer to the username.
_________________________________________________________________
Calling Sequence
char *name, *getlogin();
name = getlogin();
Description
Use the getlogin function to determine a username. The returned
pointer is in the static area.
Returns
The getlogin function returns a byte pointer to the username. If
the standard input for the process is not a terminal, the
function returns a null pointer under DG/UX.
Related Functions
See also the getenv function.
Example
This example prints out the user's name.
#include <stdio.h>
main() {
char *getlogin();
printf("Your user name is:\n");
printf("%s\n", getlogin());
}
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)