From patchwork Sat May 16 10:06:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 39275 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 801B1383F860; Sat, 16 May 2020 10:06:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 801B1383F860 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1589623603; bh=M0yukTMWiFqbNlcNxjKMujaFkecirzobA7BQpZ5c9RA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=kpGse6TSQJ9artzZNzyESQMfWptVosXfhEGkSSITeNtdJMtOYCVFBM56tBfEqdcNB vq1kcfDDMHKpAIZztnC6LM2AuTgqljl1e4b3l6q9xZss+uLOrWHCJg3Cn0SS3KNVJR +6Vybw+1A3WaUGyiieD+Y3QjpmQrdEi/I7noXUPM= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by sourceware.org (Postfix) with ESMTP id 5CB2338708FF for ; Sat, 16 May 2020 10:06:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5CB2338708FF 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-176-Ep4HEtGsOvqYoyTwWtXn9A-1; Sat, 16 May 2020 06:06:39 -0400 X-MC-Unique: Ep4HEtGsOvqYoyTwWtXn9A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 28B8B800688; Sat, 16 May 2020 10:06:38 +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 0392860BE2; Sat, 16 May 2020 10:06:34 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH v4] manual: Document the System V sigpause function Date: Sat, 16 May 2020 12:06:32 +0200 Message-ID: <874ksgjis7.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.12 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: Andreas Schwab , "Michael Kerrisk \(man-pages\)" 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. --- Changes from v3: - Add missing “variant” - Do not use the term “thread's signal mask” manual/signal.texi | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/manual/signal.texi b/manual/signal.texi index 911b422a18..47ca591c96 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 set of blocked signals, 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} variant expects a single signal number.) @end deftypefun