1getgid(2)                     System Calls Manual                    getgid(2)
2
3
4

NAME

6       getgid, getegid - get group identity
7

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

12       #include <unistd.h>
13
14       gid_t getgid(void);
15       gid_t getegid(void);
16

DESCRIPTION

18       getgid() returns the real group ID of the calling process.
19
20       getegid() returns the effective group ID of the calling process.
21

ERRORS

23       These functions are always successful and never modify errno.
24

VERSIONS

26       On  Alpha,  instead of a pair of getgid() and getegid() system calls, a
27       single getxgid() system call is provided, which returns a pair of  real
28       and effective GIDs.  The glibc getgid() and getegid() wrapper functions
29       transparently deal with this.  See  syscall(2)  for  details  regarding
30       register mapping.
31

STANDARDS

33       POSIX.1-2008.
34

HISTORY

36       POSIX.1-2001, 4.3BSD.
37
38       The  original  Linux getgid() and getegid() system calls supported only
39       16-bit group IDs.  Subsequently, Linux 2.4 added getgid32()  and  gete‐
40       gid32(), supporting 32-bit IDs.  The glibc getgid() and getegid() wrap‐
41       per functions transparently deal with the variations across kernel ver‐
42       sions.
43

SEE ALSO

45       getresgid(2), setgid(2), setregid(2), credentials(7)
46
47
48
49Linux man-pages 6.05              2023-03-30                         getgid(2)
Impressum