HP 3000 Manuals

getlogin [ MPE/iX Developer's Kit Reference Manual Volume I ] MPE/iX 5.0 Documentation


MPE/iX Developer's Kit Reference Manual Volume I

getlogin 

Gets user name.

Syntax 

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

Parameters 

None.

Return Values 

Returns a pointer to a string on success.  The return values may point to
static data that is overwritten by each cell.

A null pointer is returned on error or if the user's login name cannot be
found.

Description 

The getlogin() function returns a pointer to a string giving a user name
associated with the calling process.

Implementation Considerations 

The users login name string will be in the form "USER.ACCOUNT".

Errors 

If an error occurs, errno is set to one of the following values:

EFAULT            CAUSE           The system detected a NULL or bad address in
                                  attempting to allocate or access a string buffer area
                                  in which to move the user's login name.
                  ACTION          Report circumstances to HP.

ESYSERR           CAUSE           The system detected an unexpected error.
                  ACTION          Report circumstances to HP.

See Also 

getpwnam(), getpwuid, POSIX.1



MPE/iX 5.0 Documentation