From: "Carlos O'Donell" <carlos-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Michael Kerrisk <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: "linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Simo Sorce <ssorce-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Jakub Hrozek <jhrozek-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
GNU C Library
<libc-alpha-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org>
Subject: Re: [PATCH] getgrent.3: Add ENOENT to error list.
Date: Wed, 10 Sep 2014 12:45:25 -0400 [thread overview]
Message-ID: <54108025.3090500@redhat.com> (raw)
In-Reply-To: <54105ED1.5020206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
On 09/10/2014 10:23 AM, Carlos O'Donell wrote:
> Michael,
>
> 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
> to make users aware of what ENOENT is intended to mean
> from glibc.
>
> Patch against master. Please apply.
While I'm fixing one I might as well fix the other.
v1
- Add ENOENT.
v2
- Add EAGAIN.
diff --git a/man3/getgrent.3 b/man3/getgrent.3
index f49c746..599b9fd 100644
--- a/man3/getgrent.3
+++ b/man3/getgrent.3
@@ -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
---
Cheers,
Carlos.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-09-10 16:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 14:23 [PATCH] getgrent.3: Add ENOENT to error list Carlos O'Donell
[not found] ` <54105ED1.5020206-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-09-10 14:53 ` Siddhesh Poyarekar
2014-09-10 16:57 ` Carlos O'Donell
[not found] ` <541082E0.8050707-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-09-15 1:04 ` Siddhesh Poyarekar
2014-09-10 16:45 ` Carlos O'Donell [this message]
2014-09-14 16:09 ` Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54108025.3090500@redhat.com \
--to=carlos-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=jhrozek-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=libc-alpha-9JcytcrH/bA+uJoB2kUjGw@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ssorce-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.