pxfgetgrgid

Date:

10-20-2011

NAME

PXFGETGRGID - Gets group information using the group ID

SYNOPSIS

SUBROUTINE PXFGETGRGID(igid, jgroup, ierror)
INTEGER igid, jgroup, ierror

IMPLEMENTATION

Cray Linux Environment (CLE)

STANDARDS

IEEE standard interface for FORTRAN 77

DESCRIPTION

The PXFGETGRGID routine uses the getgrgid(3c) function to obtain group information using a group ID.

The following are components of the group structure used by PXFGETGRGID and created by calling PXFSTRUCTCREATE:

  • gr_name: Group name

  • gr_gid: Group ID

  • gr_nmem: Number of group members contained in gr_mem

  • gr_mem: Array of group members’ login names

The gr_name component can be accessed by calling PXFSTRGET(3F). gr_gid and gr_nmem can be accessed by calling PXFINTGET(3F). PXFESTRGET can be used to access the elements of gr_mem.

When using the Cray Fortran compiler, all arguments must be of default kind unless documented otherwise. The default kind is KIND=4 for integer, real, complex, and logical arguments.

The following is a list of valid arguments for this routine:

igid

An input integer variable containing the group ID, for which group information is requested.

jgroup

An output handle of type group created with PXFSTRUCTCREATE(3F).

ierror

An output integer variable that contains zero if group information was retrieved or nonzero if PXFGETGRGID was not successful.

The PXFGETGRGID routine may also return any of the following error values:

ENOENT

If igid contains an non-existant group ID.

ENOMEM

If memory needed by PXFGETGRGID could not be allocated.

EBADHANDLE

If jgroup is an invalid handle or has an incorrect handle type.

EXAMPLES

In this example, PXFGETGRGID is called for information about the group with ID = 0.

program pxftest
integer jgroup
integer ierror,ilen
character*16 name
CALL PXFGETGRGID(0,jgroup,ierror)
CALL PXFSTRGET(jgroup,'gr_name',name,ilen,ierror)
print *,'group name for the group with ID=0 is ',name
end

SEE ALSO

getgrgid(3c)