get the effective group ID
#include <sys/types.h> #include <unistd.h> gid_t getegid( void );
The getegid() function allows the calling process to find out its effective group ID.
The calling process's effective group ID. This function cannot fail.
/* * Print the effective group ID of the process. */ #include <stdio.h> #include <sys/types.h> #include <unistd.h> void main() { printf( "My effective group ID is %d\n", getegid() ); }
POSIX 1003.1
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |