Returns the name of the logged in user associated with the current thread.
#include <unistd.h> int getlogin_r ( char *name, size_t namesize );
(OUT) Points to the name of the logged in user.
(IN) Specifies the size of the name buffer.
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_r function returns the name associated with the create_identity function. It is thread safe and can be safely used in a multi-processor environment.