2.9BSD/usr/man/cat2/getuid.2

Compare this file to the similar file:
Show the results in this format:


GETUID(2)           UNIX Programmer's Manual            GETUID(2)

NAME
     getuid, getgid, geteuid, getegid - get user and group iden-
     tity

SYNOPSIS
     getuid()

     geteuid()

     getgid()

     getegid()

DESCRIPTION
     _G_e_t_u_i_d returns the real user ID of the current process,
     _g_e_t_e_u_i_d the effective user ID.  The real user ID identifies
     the person who is logged in, in contradistinction to the
     effective user ID, which determines his access permission at
     the moment.  It is thus useful to programs which operate
     using the `set user ID' mode, to find out who invoked them.

     _G_e_t_g_i_d returns the real group ID, _g_e_t_e_g_i_d the effective
     group ID.

SEE ALSO
     setuid(2)

ASSEMBLER
     (getuid = 24.)
     sys getuid
     (real user ID in r0, effective user ID in r1)

     (getgid = 47.)
     sys getgid
     (real group ID in r0, effective group ID in r1)

Printed 12/11/82                                                1