Retrieve the username that started the process.
Compatibility:This function is compatible with the following targets:
|
EMB/RTOS
|
|
#include <unistd.h>
char *getlogin(void);Parameters: Remarks:
The function getlogin() retrieves the name of the user who started the program. Example of usage is given in "Example of getlogin() usage."
NOTE
getlogin() returns a character pointer.
#include <stdio.h>
#include <unistd.h>
int main(void)
{
printf("The login name is %s\n", getlogin());
return 0;
}
result
The login name is Metrowerks
[ First ] [ Previous ] [ Next ] [ Last ] [ Manuals ]
Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.
Last updated: August 16, 2000