Returns the name of the logged in user associated with the current thread.
#include <unistd.h> char *getlogin ( void );
If successful, returns the a non-null pointer to the user name or a null pointer it the user's name cannot be found. Otherwise, retuns -1 and sets errno to indicate the error.
The getlogin function returns the name associated with the create_identity function. It is not thread safe. In a multi-processor environment, use the getlogin_r function.