#include <sys/types.h> #include <unistd.h> gid_t getgid(void);
getgid
determines the real group ID of the calling process.
getgid
returns the real group ID of the
calling process.
Under
unusual conditions (for instance, if OpenEdition is not running)
getegid
can fail. In this case, getgid
issues an MVS user ABEND 1230
to indicate the error.
getgid
to
determine the real group ID of a calling process:
#include <sys/types.h> #include <stdio.h> #include <unistd.h> . . . printf("The group ID is %d\n", (int) getgid()); . . .
getegid
, getuid
, setgid
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.