[Previous]
[Contents]
[Next]

geteuid()

get the effective user ID

Synopsis:

#include <sys/types.h>
#include <unistd.h>
uid_t geteuid( void );

Description:

The geteuid() function allows the calling process to find out its effective user ID.

Returns:

The calling process's effective user ID.

Examples:

/*
 * Print the effective user ID of the process.
 */
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>

void main()
  {
    printf( "My effective user ID is %d\n", geteuid() );
  }

Classification:

POSIX 1003.1

Safety:
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

getuid(), getgid(), getegid()


[Previous]
[Contents]
[Next]