getuid and getgid get the user or group ID of the process, respectively.
INTEGER*4 getuid uid = getuid() |
|||
---|---|---|---|
Return value |
INTEGER*4 |
Output |
User ID of the process |
INTEGER*4 getgid gid = getgid() |
|||
---|---|---|---|
Return value |
INTEGER*4 |
Output |
Group ID of the process |
Example: getuid() and getpid():
INTEGER*4 getuid, getgid, gid, uid uid = getuid() gid = getgid() write(*,*) uid, gid end
See also: getuid(2).