Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
getgrgid_r(3) OSS Library Calls Reference Manual
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
sufficient heap space to complete the call.
[EINVAL] The value specified 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 file 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 specified group ID does not exist, or the gid parameter contains an empty
string.
[ENOMEM] There is insufficient user memory to complete the call.
[ERANGE] Insufficient storage was supplied using buffer and buflen to contain the data to be
referenced by the resulting group structure.
RELATED INFORMATION
Functions: getgrnam(3), getgrnam_r(3), getpwent(3), getpwent_r(3).
STANDARDS CONFORMANCE
H06.21 and later H-series RVUs, J06.10 and later J-series RVUs
This function conforms to IEEE Std 1003.1 2004, POSIX System Application Program Interface.
The HP implementation of this function does not return these errno values because these condi-
tions cannot occur:
• [EINTR], [EMFILE], or [ENFILE]
The following are HP extensions to the standard:
• The errno values [EAGAIN], [EINVAL], [ENOCRE], [ENOENT], and [ENOMEM] can
be returned.
Standard POSIX Threads Library
This function is an extension to the UNIX98 specification. 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 file spthread.h is an HP exception to the POSIX standard.
3−44 Hewlett-Packard Company 527187-017