From patchwork Sat May 16 09:29:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 39273 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0A26F386F80C; Sat, 16 May 2020 09:30:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A26F386F80C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1589621412; bh=Mbhm21Oo0T6N7YM7V85pmaNUZRvAyiqEP8Cn+r91Ybs=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=sHoiI/slg3fcYYqlM4KoTyi5YVkNApA6V/HGRvX4esN8fYqGEuq7ntPV7iqOHhgmo BENVi0HYtZ/5cN0WtrZSkaZUlGjk8YnY+ml+6S/Jg0fcbXEMnxHAvhD/GO7uck59dD /UU5OMQIV2RmVgNaMcjeC5ac86ZV1afANH49N9SY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id E52A2386F80C for ; Sat, 16 May 2020 09:30:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E52A2386F80C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-461-B-vPGRSZOICHi_2F_JW8vg-1; Sat, 16 May 2020 05:30:06 -0400 X-MC-Unique: B-vPGRSZOICHi_2F_JW8vg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3E1258015D1; Sat, 16 May 2020 09:30:05 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-112-65.ams2.redhat.com [10.36.112.65]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63A1778B43; Sat, 16 May 2020 09:30:01 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH v3] manual: Document the System V sigpause function Date: Sat, 16 May 2020 11:29:59 +0200 Message-ID: <87k11cjkh4.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Cc: Michael Kerrisk Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" 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 | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/manual/signal.texi b/manual/signal.texi index 911b422a18..8c9af717f2 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 systems. @end menu @node Concepts of Signals @@ -3301,8 +3303,14 @@ 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} +@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/!bsd!linux}}@asunsafe{@asulock{/hurd}}@acunsafe{@aculock{/hurd}}} @c sigpause @mtasurace:sigprocmask/!bsd!linux @asulock/hurd @aculock/hurd @c [posix] @@ -3312,8 +3320,15 @@ the previous set of blocked signals. @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. +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. + +New code should use the @code{sigsuspend} function instead. + +The @code{sigpause} function in @theglibc{} is the @w{System V} +variant. The BSD variant is no longer provided by @theglibc{}. +(The difference is that the BSD variant has a bitmask argument, +while the @w{System V} expects a single signal number.) @end deftypefun