Returns information about a local user.
#include <pwd.h> int getpwuid_r ( uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result );
(IN) Specifies the ID of a local user obtained from such functions as getuid, geteuid, or stat.
(IN) Points to a passwd structure which is updated with information about the specified user.
(IN) Points to a buffer to use for referenced strings.
(IN) Specifies the size of the buffer parameter, in bytes. Use sysconf to determine the maximum length of referenced strings.
(IN) Points to a NULL pointer if an error occurs or the entry cannot be found.
If successful, returns 0. Otherwise, returns an error code:
The getpwuid_r function is the preferred function for applications running in a multi-threaded, multi-processor environment.