getgrent.3: Add ENOENT and EAGAIN to error list

It's possible to get ENOENT returned from getgrent()
if the backend, for example say SSSD, isn't configured
or the daemon isn't running. The same can be said of any
of the NSS backend.

As POSIX does not list ENOENT, we can list it ourselves
and define it how we like.

I don't know how you handle errno values that are glibc
specific, but here is the patch that enhances getgrent(3)
to make users aware of what ENOENT is intended to mean
from glibc.

While I'm fixing one I might as well [add EAGAIN].

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Carlos O'Donell 2014-09-10 12:45:25 -04:00 committed by Michael Kerrisk
parent e0b7e9a221
commit 7109ed8103
1 changed files with 10 additions and 0 deletions

View File

@ -129,6 +129,11 @@ or
.BR free (3).)
.SH ERRORS
.TP
.B EAGAIN
The service was temporarily unavailable; try again later.
For NSS backends in glibc this indicates a temporary error talking to the backend.
The error may correct itself, retrying later is suggested.
.TP
.B EINTR
A signal was caught.
.TP
@ -141,6 +146,11 @@ The calling process already has too many open files.
.B ENFILE
Too many open files in the system.
.TP
.\" not in POSIX
.B ENOENT
A necessary input file cannot be found.
For NSS backends in glibc this indicates the backend is not correctly configured.
.TP
.B ENOMEM
.\" not in POSIX
Insufficient memory to allocate