VMS Help  —  CRTL  getgrent
    Gets a group database entry.

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

    Format

      #include  <grp.h>

      struct group *getgrent  (void);

1  –  Description

    The getgrent function returns the next group in the sequential
    search, returning a pointer to a structure containing the broken-
    out fields of an entry in the group database.

    When first called, getgrent returns a pointer to a group
    structure containing the first entry in the group database.
    Thereafter, it returns a pointer to the next group structure
    in the group database, so successive calls can be used to search
    the entire database.

    If an end-of-file or an error is encountered on reading, getgrent
    returns a NULL pointer and sets errno.

2  –  Return Values

    x                  Pointer to a group structure, if successful.
    NULL               Indicates that an error occurred. 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  EINTR - A signal was intercepted during the
                          operation.

                       o  EIO - Indicates that an I/O error occurred.

                       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.
Close Help