getuid - get user identity
#include <unistd.h> #include <sys/types.h>
uid_t getuid(void);
getuid(2) returns the RealID of the current process.
The real ID corresponds to the ID of the calling process. The effective ID corresponds to the set ID bit on the file being executed.
These functions are always successful.
POSIX, BSD 4.3.
16 pages link to getuid(2):