[Previous]
[Contents]
[Next]

setgrent()

rewind to the start of the group database

Synopsis:

#include <grp.h>
int setgrent( void );

Description:

The setgrent() function rewinds to the start of the group database. It's provided for programs that make multiple lookups in the group database (using the getgrgid() and getgrnam() calls) to avoid the default opening and closing of the group database for each access.

Returns:

0 on success, -1 if an error occurs.

Examples:

See getgrent().

Classification:

UNIX

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

endgrent(), errno, getgrent(), getgrgid(), getgrnam(), getpwent()


[Previous]
[Contents]
[Next]