From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Keno Fischer <keno-9DCaDmOhoh+8M3too/+dENBPR1lH4CV8@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] poll.2/select.2: Add a reference to the sigset discussion in sigprocmask
Date: Tue, 27 Dec 2016 21:06:57 +0100 [thread overview]
Message-ID: <85bf4f79-e6bb-71a9-3aa0-e9df8975d590@gmail.com> (raw)
In-Reply-To: <20161227193229.GA557-9DCaDmOhoh+8M3too/+dENBPR1lH4CV8@public.gmane.org>
Hello Keno,
On 12/27/2016 08:32 PM, Keno Fischer wrote:
> A little while back, I added a note to sigprocmask.2 that discussed the
> difference between the libc's and the kernel's sigset_t structures.
> I added that note, because I saw this being done wrong in a tool tracing
> system calls (causing subtle bugs). As it turns out, the same bugs existed
> for ppoll and pselect, for the same reason. I'm hoping by adding the
> reference here, future writers of similar tools will find that discussion
> and not make the same mistake.
Thanks! Applied.
Cheers,
Michael
> ---
> man2/poll.2 | 5 ++++-
> man2/select.2 | 11 +++++++----
> 2 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/man2/poll.2 b/man2/poll.2
> index 26bb10d..163df6e 100644
> --- a/man2/poll.2
> +++ b/man2/poll.2
> @@ -416,7 +416,10 @@ The glibc
> .BR ppoll ()
> wrapper function specifies this argument as a fixed value
> (equal to
> -.IR sizeof(sigset_t) ).
> +.IR sizeof(kernel_sigset_t) ). See
> +.BR sigprocmask(2)
> +for a discussion on the differences between the kernel and the libc
> +notion of the sigset.
> .SH BUGS
> See the discussion of spurious readiness notifications under the
> BUGS section of
> diff --git a/man2/select.2 b/man2/select.2
> index 1a5d36a..5b02fda 100644
> --- a/man2/select.2
> +++ b/man2/select.2
> @@ -510,9 +510,9 @@ pointer, but is instead a structure of the form:
> .nf
>
> struct {
> - const sigset_t *ss; /* Pointer to signal set */
> - size_t ss_len; /* Size (in bytes) of object pointed
> - to by 'ss' */
> + const kernel_sigset_t *ss; /* Pointer to signal set */
> + size_t ss_len; /* Size (in bytes) of object pointed
> + to by 'ss' */
> };
>
> .fi
> @@ -520,7 +520,10 @@ struct {
> This allows the system call to obtain both
> a pointer to the signal set and its size,
> while allowing for the fact that most architectures
> -support a maximum of 6 arguments to a system call.
> +support a maximum of 6 arguments to a system call. See
> +.BR sigprocmask(2)
> +for a discussion of the difference between the kernel and libc
> +notion of the signal set.
> .SH BUGS
> POSIX allows an implementation to define an upper limit,
> advertised via the constant
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
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
prev parent reply other threads:[~2016-12-27 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-27 19:32 [PATCH] poll.2/select.2: Add a reference to the sigset discussion in sigprocmask Keno Fischer
[not found] ` <20161227193229.GA557-9DCaDmOhoh+8M3too/+dENBPR1lH4CV8@public.gmane.org>
2016-12-27 20:06 ` Michael Kerrisk (man-pages) [this message]
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=85bf4f79-e6bb-71a9-3aa0-e9df8975d590@gmail.com \
--to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=keno-9DCaDmOhoh+8M3too/+dENBPR1lH4CV8@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@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.