Library /sys$common/syshlp/helplib.hlb  —  CRTL  getgrgid
    Gets a group database entry for a group ID.

    This function is supported on OpenVMS Integrity servers and
    Alpha only.

    Format

      #include  <types.h>

      #include  <grp.h>

      struct group *getgrgid  (gid_t gid);

1  –  Argument

 gid

    The group ID of the group for which the group database entry is
    to be retrieved.

2  –  Description

    The getgrgid function searches the group database for an entry
    with a matching gid and returns a pointer to the group structure
    containing the matching entry.

3  –  Return Values

    x                  Pointer to a valid group structure containing
                       a matching entry.
    NULL               An error occurred.

                       Note: The return value points to a static area
                       that is overwritten by subsequent calls to
                       getgrent, getgrgid, or getgrnam.

                       On error, the function sets errno to one of
                       the following values:

                       o  EACCES - The user process does not have
                          appropriate privileges enabled to access
                          the user authorization file.

                       o  EIO - An I/O error has occurred.

                       o  EINTR - A signal was intercepted during
                          getgrgid.

                       o  EMFILE - OPEN_MAX file descriptors are
                          currently open in the calling process.

                       o  ENFILE - The maximum allowable number of
                          files is currently open in the system.

                       Applications checking for error situations
                       must set errno to 0 before calling getgrgid.
                       If errno is set on return, an error has
                       occurred.
Close Help