Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getgrgid_r(3) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getgrgid(3C)

grp(5)

getgrgid_r(3)                                                 getgrgid_r(3)

NAME
     getgrgidr - thread-safe get group database entry for a group ID

SYNOPSIS
     #include <grp.h>

     int getgrgidr(gidt gid, struct group *grp, char *buffer,
             sizet bufsize, struct group **result);

DESCRIPTION
     The getgrgidr() function updates the group structure pointed to by
     grp and stores a pointer to that structure at the location pointed to
     by result. The structure contains an entry from the group database
     with a matching gid. Storage referenced by the group structure is
     allocated from the memory provided with the buffer parameter, which is
     bufsize characters in size. A NULL pointer is returned at the location
     pointed to by result on error or if the requested entry is not found.

     Applications wishing to check for error situations should set errno to
     0 before calling getgrgidr(). If errno is set to non-zero on return,
     an error occurred.

RETURN VALUE
     If successful, the getgrgidr() function returns zero. Otherwise, an
     error number is returned to indicate the error.

ERRORS
     The getgrgidr() function may fail if:

     ERANGE    Insufficient storage was supplied via buffer and bufsize to
               contain the data to be referenced by the resulting group
               structure.

SEE ALSO
     getgrgid(3C), grp(5).




















Page 1                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026