1*61181Sbostic.\" Copyright (c) 1983, 1991, 1993 2*61181Sbostic.\" The Regents of the University of California. All rights reserved. 320221Smckusick.\" 447208Scael.\" %sccs.include.redist.man% 520221Smckusick.\" 6*61181Sbostic.\" @(#)getgid.2 8.1 (Berkeley) 06/04/93 747208Scael.\" 847208Scael.Dd 947208Scael.Dt GETGID 2 1047208Scael.Os BSD 4.2 1147208Scael.Sh NAME 1247208Scael.Nm getgid , 1347208Scael.Nm getegid 1447208Scael.Nd get group process identification 1547208Scael.Sh SYNOPSIS 1647208Scael.Fd #include <sys/types.h> 1747208Scael.Ft gid_t 1847208Scael.Fn getgid void 1947208Scael.Ft gid_t 2047208Scael.Fn getegid void 2147208Scael.Sh DESCRIPTION 2247208ScaelThe 2347208Scael.Fn getgid 2447208Scaelfunction returns the real group ID of the calling process, 2547208Scael.Fn getegid 2647208Scaelreturns the effective group ID of the calling process. 2747208Scael.Pp 2820221SmckusickThe real group ID is specified at login time. 2947208Scael.Pp 3047208ScaelThe real group ID is the group of the user who invoked the program. 3147208ScaelAs the effective group ID gives the process additional permissions 3247208Scaelduring the execution of 3347208Scael.Dq Em set-group-ID 3447208Scaelmode processes, 3547208Scael.Fn getgid 3647208Scaelis used to determine the real-user-id of the calling process. 3747208Scael.Sh ERRORS 3847208ScaelThe 3947208Scael.Fn getgid 4047208Scaeland 4147208Scael.Fn getegid 4247208Scaelfunctions are always successful, and no return value is reserved to 4347208Scaelindicate an error. 4447208Scael.Sh SEE ALSO 4547208Scael.Xr getuid 2 , 4647208Scael.Xr setregid 2 , 4747208Scael.Xr setgid 3 4847208Scael.Sh STANDARDS 4947208Scael.Fn Getgid 5047208Scaeland 5147208Scael.Fn getegid 5247208Scaelconform to IEEE Std 1003.1-1988 5347208Scael.Pq Dq Tn POSIX . 54