Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
MPE/iX Developer's Kit Reference Manual Volume I: HP 3000 MPE/iX Computer Systems > Chapter 4  POSIX/iX Library Function Descriptions

getgrgid

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Group data base access based on GID.

Syntax

   #include <sys/types.h>

   #include <grp.h> 

   struct group *getgrgid(gid_t gid);

Parameters

gid

A value of a GID.

Return Values

Returns a pointer to an object of type struct group on success. The return values may point to static data that is overwritten by each cell.

A null pointer is returned on error or if the requested entry is not found.

Description

The getgrgid() function returns a pointer to an object of type struct group containing an entry from the group database with a matching GID. This structure, which is defined in <grp.h>, includes the members shown below:

gr_name

The name of the group.

gr_gid

The numerical group ID.

gr_mem

A null-terminated vector of pointers to the individual member names.

Implementation Considerations

Currently, member gr-mem has not been implemented. It returns NULL.

Errors

If an error occurs, errno is set to one of the following values:

EFAULTCAUSEThe system detected a NULL or bad address when attempting to allocate or access a struct group buffer.
 ACTIONReport circumstances to HP
EINVALCAUSEThe GID parameter is invalid. No matching entry was found in the group database.
 ACTIONSpecify a valid GID.
ESYSERRCAUSEThe system detected an unexpected error.
 ACTIONReport circumstances to HP.

See Also

getlogin(),getgrnam() POSIX.1

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.