Retrieve the current user's ID.
Compatibility:This function is compatible with the following targets:
|
EMB/RTOS
|
|
#include <unistd.h>
char *cuserid(char *string);Parameters:
Parameters for this facility are:
The function cuserid() returns the user name associated with the current process. If the string argument is NULL, the file name is stored in an internal buffer. If it is not NULL, it must be at least FILENAME_MAX large. Example of usage is given in "Example of cuserid() usage."
NOTE
cuserid() returns a character pointer to the current user's ID.
NOTE
#include <stdio.h>
#include <unistd.h>
int main(void)
{
char *c_id = NULL;
printf("The current user ID is %s\n",cuserid(c_id));
return 0;
}
Result
The current user ID 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