OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man2 / getgid.2
1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
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.
12 .\"
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.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .TH GETGID 2 2010-11-22 "Linux" "Linux Programmer's Manual"
26 .SH NAME
27 getgid, 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
37 .BR getgid ()
38 returns the real group ID of the calling process.
39
40 .BR getegid ()
41 returns the effective group ID of the calling process.
42 .SH ERRORS
43 These functions are always successful.
44 .SH CONFORMING TO
45 POSIX.1-2001, 4.3BSD.
46 .SH NOTES
47 The original Linux
48 .BR getgid ()
49 and
50 .BR getegid ()
51 system calls supported only 16-bit group IDs.
52 Subsequently, Linux 2.4 added
53 .BR getgid32 ()
54 and
55 .BR getegid32 (),
56 supporting 32-bit IDs.
57 The glibc
58 .BR getgid ()
59 and
60 .BR getegid ()
61 wrapper functions transparently deal with the variations across kernel versions.
62 .SH SEE ALSO
63 .BR getresgid (2),
64 .BR setgid (2),
65 .BR setregid (2),
66 .BR credentials (7)
67 .SH COLOPHON
68 This page is part of release 3.79 of the Linux
69 .I man-pages
70 project.
71 A description of the project,
72 information about reporting bugs,
73 and the latest version of this page,
74 can be found at
75 \%http://www.kernel.org/doc/man\-pages/.