unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Michael Kerrisk via Libc-alpha <libc-alpha@sourceware.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha <libc-alpha@sourceware.org>,
	Michael Kerrisk-manpages <mtk.manpages@gmail.com>
Subject: Re: [PATCH] manual: Document the System V sigpause function
Date: Tue, 12 May 2020 06:59:18 +0200	[thread overview]
Message-ID: <CALxWeYr538rjje7LPu6LiuK=OnHe-XiYB3rTKV0WCegYVD1DTA@mail.gmail.com> (raw)
In-Reply-To: <87h7zfn6rm.fsf@oldenburg2.str.redhat.com>

Hello Florian,

On Mon, Feb 24, 2020 at 8:07 PM Florian Weimer <fweimer@redhat.com> wrote:
>
> <signal.h> currently provides only the System V variant of sigpause.
> Update the documentation of the function and move it to its own node.
>
> -----
>  manual/signal.texi | 35 ++++++++++++++++++++---------------
>  1 file changed, 20 insertions(+), 15 deletions(-)
>
> diff --git a/manual/signal.texi b/manual/signal.texi
> index 33e6646975..62cec48450 100644
> --- a/manual/signal.texi
> +++ b/manual/signal.texi
> @@ -39,6 +39,8 @@ and synchronize.
>  * Signal Stack::                Using a Separate Signal Stack.
>  * BSD Signal Handling::         Additional functions for backward
>                                  compatibility with BSD.
> +* Obsolete Signal Handling::   Deprecated functions for compatibility with
> +                                 other sytems.
>  @end menu
>
>  @node Concepts of Signals
> @@ -3295,19 +3297,22 @@ the calling process's signal mask to @var{mask}.  The return value is
>  the previous set of blocked signals.
>  @end deftypefun
>
> -@deftypefun int sigpause (int @var{mask})
> -@standards{BSD, signal.h}
> -@safety{@prelim{}@mtunsafe{@mtasurace{:sigprocmask/!bsd!linux}}@asunsafe{@asulock{/hurd}}@acunsafe{@aculock{/hurd}}}
> -@c sigpause @mtasurace:sigprocmask/!bsd!linux @asulock/hurd @aculock/hurd
> -@c [posix]
> -@c  __sigpause @mtasurace:sigprocmask/!bsd!linux @asulock/hurd @aculock/hurd
> -@c   do_sigpause @mtasurace:sigprocmask/!bsd!linux @asulock/hurd @aculock/hurd
> -@c    sigprocmask(0) dup @asulock/hurd @aculock/hurd [no @mtasurace:sigprocmask/bsd(SIG_UNBLOCK)]
> -@c    sigdelset dup ok
> -@c    sigset_set_old_mask dup ok
> -@c    sigsuspend dup @mtasurace:sigprocmask/!bsd!linux @asulock/hurd @aculock/hurd
> -This function is the equivalent of @code{sigsuspend} (@pxref{Waiting
> -for a Signal}):  it sets the calling process's signal mask to @var{mask},
> -and waits for a signal to arrive.  On return the previous set of blocked
> -signals is restored.
> +@node Obsolete Signal Handling
> +@section Obsolete Signal Handling
> +
> +This section describes deprecated signal handling functions which are
> +provided for compatibility with other systems.
> +
> +@deftypefun int sigpause (int @var{signal})
> +@standards{XOPEN, signal.h}
> +@safety{@prelim{}@mtunsafe{@mtasurace{:sigprocmask}}@asunsafe{@asulock{/hurd}}@acunsafe{@aculock{/hurd}}}
> +This deprecated function is a precursor to the @code{sigsuspend}
> +function (@pxref{Waiting for a Signal}): it removes @var{signal} from
> +the thread's signal mask, and waits for a signal to arrive.  On return
> +the previous set of blocked signals is restored.

s/previous set of blocked signals is restored/thread's previous signal
mask is restored/ ?

> +
> +New code should use the @code{sigsuspend} function directly.

s/directly/instead/ ?

> +
> +The @code{sigpause} function in @theglibc{} is the @w{System V}
> +variant.  The BSD variant is no longer provided by @theglibc{}.
>  @end deftypefun

Of course, this last sentence leaves the reader asking questions. Maybe:

The BSD variant ==>
The BSD variant (which takes an argument specifying mask of signals to
be temporarily unblocked)

?

Thanks,

Michael

  parent reply	other threads:[~2020-05-12  4:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-24 19:07 [PATCH] manual: Document the System V sigpause function Florian Weimer
2020-05-12  4:01 ` Carlos O'Donell via Libc-alpha
2020-05-12  4:59 ` Michael Kerrisk via Libc-alpha [this message]
2020-05-16  9:25   ` Florian Weimer via Libc-alpha
2020-05-16  9:56     ` Michael Kerrisk (man-pages) via Libc-alpha
2020-05-16 10:03       ` Florian Weimer via Libc-alpha
2020-05-16 10:18         ` Michael Kerrisk (man-pages) via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALxWeYr538rjje7LPu6LiuK=OnHe-XiYB3rTKV0WCegYVD1DTA@mail.gmail.com' \
    --to=libc-alpha@sourceware.org \
    --cc=fweimer@redhat.com \
    --cc=mtk.manpages@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).