[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


getlogin

Retrieve the username that started the process.

Compatibility:

This function is compatible with the following targets:

ANSI

BeOS

EMB/RTOS

Mac OS

Palm OS

Win32


Prototype:
#include <unistd.h>
char *getlogin(void);
Parameters:

None

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

The Mac doesn't have a login, so this function returns the Owner Name from the File Sharing Setup Control Panel
Return:

getlogin() returns a character pointer.

Example of getlogin() usage.:
#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