[Previous]
[Contents]
[Next]

getegid()

get the effective group ID

Synopsis:

#include <sys/types.h>
#include <unistd.h>
gid_t getegid( void );

Description:

The getegid() function allows the calling process to find out its effective group ID.

Returns:

The calling process's effective group ID. This function cannot fail.

Examples:

/*
 * 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() );
  }

Classification:

POSIX 1003.1

Safety:
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

getgid(), getuid(), geteuid()


[Previous]
[Contents]
[Next]