rewind to the start of the group database
#include <grp.h> int setgrent( void );
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.
0 on success, -1 if an error occurs.
See getgrent().
UNIX
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
endgrent(), errno, getgrent(), getgrgid(), getgrnam(), getpwent()