]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/getgid.2
sock_diag.7: Tweaks to Dmitry Levin's page
[thirdparty/man-pages.git] / man2 / getgid.2
CommitLineData
fea681da
MK
1.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2.\"
93015253 3.\" %%%LICENSE_START(VERBATIM)
fea681da
MK
4.\" Permission is granted to make and distribute verbatim copies of this
5.\" manual provided the copyright notice and this permission notice are
6.\" preserved on all copies.
7.\"
8.\" Permission is granted to copy and distribute modified versions of this
9.\" manual under the conditions for verbatim copying, provided that the
10.\" entire resulting derived work is distributed under the terms of a
11.\" permission notice identical to this one.
c13182ef 12.\"
fea681da
MK
13.\" Since the Linux kernel and libraries are constantly changing, this
14.\" manual page may be incorrect or out-of-date. The author(s) assume no
15.\" responsibility for errors or omissions, or for damages resulting from
16.\" the use of the information contained herein. The author(s) may not
17.\" have taken the same level of care in the production of this manual,
18.\" which is licensed free of charge, as they might when working
19.\" professionally.
c13182ef 20.\"
fea681da
MK
21.\" Formatted or processed versions of this manual, if unaccompanied by
22.\" the source, must acknowledge the copyright and authors of this work.
4b72fb64 23.\" %%%LICENSE_END
fea681da 24.\"
460495ca 25.TH GETGID 2 2015-08-08 "Linux" "Linux Programmer's Manual"
fea681da
MK
26.SH NAME
27getgid, getegid \- get group identity
28.SH SYNOPSIS
29.B #include <unistd.h>
30.br
31.B #include <sys/types.h>
32.sp
33.B gid_t getgid(void);
34.br
35.B gid_t getegid(void);
36.SH DESCRIPTION
e511ffb6 37.BR getgid ()
a1ffe9f5 38returns the real group ID of the calling process.
fea681da 39
e511ffb6 40.BR getegid ()
a1ffe9f5 41returns the effective group ID of the calling process.
fea681da
MK
42.SH ERRORS
43These functions are always successful.
47297adb 44.SH CONFORMING TO
431e43bc 45POSIX.1-2001, POSIX.1-2008, 4.3BSD.
7c36affc
MK
46.SH NOTES
47The original Linux
48.BR getgid ()
49and
50.BR getegid ()
51system calls supported only 16-bit group IDs.
c5662d5d 52Subsequently, Linux 2.4 added
7c36affc
MK
53.BR getgid32 ()
54and
55.BR getegid32 (),
56supporting 32-bit IDs.
57The glibc
58.BR getgid ()
59and
60.BR getegid ()
61wrapper functions transparently deal with the variations across kernel versions.
47297adb 62.SH SEE ALSO
24e45983 63.BR getresgid (2),
fea681da 64.BR setgid (2),
24e45983
MK
65.BR setregid (2),
66.BR credentials (7)