VMS Help  —  CRTL  getegid
    With POSIX IDs disabled, this function is equivalent to getgid
    and returns the group number from the user identification code
    (UIC).

    With POSIX IDs enabled, this function returns the effective group
    ID of the calling process.

    Format

      #include  <unistd.h>

      gid_t getegid  (void);

1  –  Description

    The getegid function can be used with POSIX style identifiers
    (IDs) or with UIC-based identifiers.

    POSIX style IDs are supported on OpenVMS Version 7.3-2 and
    higher.

    With POSIX style IDs disabled, the getegid and getgid functions
    are equivalent and return the group number from the current UIC.
    For example, if the UIC is [313,031], 313 is the group number.

    With POSIX style IDs enabled, getegid returns the effective group
    ID of the calling process, and getgid returns the real group ID
    of the calling process. The real group ID is specified at login
    time. The effective group ID is more transient, and determines
    additional access permission during execution of a set-group-ID
    process. It is for such processes that the getgid function is
    most useful.

    The getegid function is always successful; no return value is
    reserved to indicate an error.

    See also geteuid and getuid.

2  –  Return Value

    x                  The effective group ID (POSIX IDs enabled),
                       or the group number from the UIC (POSIX IDs
                       disabled).
Close Help