Open System Services System Calls Reference Manual (G06.28+, H06.05+)

getgrgid_r(2) OSS System Calls Reference Manual
gr_passwd The system does not use this eld, so its value is meaningless.
gr_gid The group ID of the group.
gr_mem The members of the group.
OSS supports the following POSIX.1-compliant
group declaration:
struct group {
char *gr_name;
char *gr_passwd;
gid_t gr_gid;
char **gr_mem;
};
The gr_passwd eld is provided for compatibility with some versions of UNIX, but it always
contains a null string.
RETURN VALUES
Upon successful completion, the getgrgid_r() function returns 0 (zero). Otherwise, the function
returns an error number, as described in the ERRORS subsection of this reference page.
ERRORS
If any of these conditions occur, the getgrgid_r() function returns the corresponding value:
[EAGAIN] A system resource is temporarily unavailable. The function cannot allocate
sufcient heap space to complete the call.
[EINVAL] The value specied for the gid parameter is outside the range of valid values for
group IDs, or the value could not be passed in the call for other reasons.
[EIO] A disk process or le system input or output error occurred. Data might have
been lost during the transfer.
[ENOCRE] The calling process does not use the Common Run-Time Environment (CRE)
but requested a service that requires CRE (the static area cannot be allocated in
the calling process).
[ENOENT] The specied group ID does not exist, or the gid parameter contains an empty
string.
[ENOMEM] There is insufcient user memory to complete the call.
[ERANGE] Insufcient storage was supplied using buffer and buen to contain the data to be
referenced by the resulting group structure.
RELATED INFORMATION
Functions: getgrnam(3), getgrnam_r(2), getpwent(3), getpwent_r(2).
STANDARDS CONFORMANCE
This function is an extension to the UNIX98 specication. Interfaces documented on this refer-
ence page conform to the following industry standards:
IEEE Std 1003.1c-1995, POSIX System Application Program Interface
The use of the header le spthread.h is an HP exception to the POSIX standard.
370 Hewlett-Packard Company 527186-007