The getgid(2) and getegid(2) Functions

The id(1) command must determine the gid it is operating under. The getgid(2) and getegid(2) functions are shown in the synopsis for this purpose:

#include <sys/types.h>
#include <unistd.h>

gid_t getgid(void);

gid_t getegid(void);

The getgid(2) function returns the real group ID number, and the getegid(2) function returns the effective group ID. There are no errors to check; these functions always succeed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.47.221