1GETGID(2)                  Linux Programmer's Manual                 GETGID(2)
2
3
4

NAME

6       getgid, getegid - get group identity
7

SYNOPSIS

9       #include <unistd.h>
10
11       gid_t getgid(void);
12       gid_t getegid(void);
13

DESCRIPTION

15       getgid() returns the real group ID of the calling process.
16
17       getegid() returns the effective group ID of the calling process.
18

ERRORS

20       These functions are always successful and never modify errno.
21

CONFORMING TO

23       POSIX.1-2001, POSIX.1-2008, 4.3BSD.
24

NOTES

26       The  original  Linux getgid() and getegid() system calls supported only
27       16-bit group IDs.  Subsequently, Linux 2.4 added getgid32()  and  gete‐
28       gid32(), supporting 32-bit IDs.  The glibc getgid() and getegid() wrap‐
29       per functions transparently deal with the variations across kernel ver‐
30       sions.
31
32       On  Alpha,  instead of a pair of getgid() and getegid() system calls, a
33       single getxgid() system call is provided, which returns a pair of  real
34       and effective GIDs.  The glibc getgid() and getegid() wrapper functions
35       transparently deal with this.  See  syscall(2)  for  details  regarding
36       register mapping.
37

SEE ALSO

39       getresgid(2), setgid(2), setregid(2), credentials(7)
40

COLOPHON

42       This  page  is  part of release 5.13 of the Linux man-pages project.  A
43       description of the project, information about reporting bugs,  and  the
44       latest     version     of     this    page,    can    be    found    at
45       https://www.kernel.org/doc/man-pages/.
46
47
48
49Linux                             2021-03-22                         GETGID(2)
Impressum