group_from_gid()

get group name associated with gid  

Function


SYNOPSIS

#include <grp.h>

char *group_from_gid(gid_t gid, int nogroup);


DESCRIPTION

The group_from_gid() function returns the group name associated with the argument gid. The group name is cached so that multiple calls with the same gid do not require additional calls to getgrgid(). If there is no group associated with the gid, a pointer is returned to an ASCII representation of the gid, unless the argument nogroup is non-zero, in which case a NULL pointer is returned.


PARAMETERS

gid 

Is the gid for which group name is to be obtained.

nogroup 

Indicates what to do if gid is not associated with a group name.


RETURN VALUES

Returns the group name associated with gid or ASCII representation of gid or NULL.


CONFORMANCE

4.4BSD.


MULTITHREAD SAFETY LEVEL

Unsafe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
getgrgid()


PTC MKS Toolkit 10.4 Documentation Build 39.