From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8702F1F5AE for ; Sun, 28 Jun 2020 20:13:25 +0000 (UTC) Received: from localhost ([::1]:58594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpdg4-00049A-9w for normalperson@yhbt.net; Sun, 28 Jun 2020 16:13:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpdg1-000484-AC for bug-gnulib@gnu.org; Sun, 28 Jun 2020 16:13:21 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.163]:24640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpdfy-00036R-3J for bug-gnulib@gnu.org; Sun, 28 Jun 2020 16:13:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1593375195; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=VENmBE0/wqyjxCoszwXmgz7oa4iVL8h/wBqfwL+xIX0=; b=Y0+Bxs62+Ex1zxMNhyh8YVZPkFHMpo0dJ6bvCdyCt8fSxtv+/xb7jOPya24w6cJF3S LW5Wz5kuPsa2q142dw5IDhBTK95u1XCmc7vsL5x9Ps00C6zfEVGx7kmLFRCAFaP37Mso 8YdhHN8Luhw8/XHMaNrfGs6sGONxVglMWsYJjLmmceBGeU8j7s2PL6MNK9LYeF1zGcac ljupp2qcEEODMz9fjGOw+SGAWULAP/rr7R8c6huSTanbVr3z63pSR6ZyXKbm3bY9MW6j o3Q79Spu3owXR7zyBMsGvdG1aN30wHBhVR+PX5Rvb582cfj4+uOv1wq7Lgq/x8Y6kXLl MltQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOH6fzxfs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 46.10.5 DYNA|AUTH) with ESMTPSA id R03d1aw5SKDFP3i (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sun, 28 Jun 2020 22:13:15 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: doc: add a note about sigprocmask vs. pthread_sigmask Date: Sun, 28 Jun 2020 22:13:14 +0200 Message-ID: <13506727.IGYX0WdNEv@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=81.169.146.163; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/28 16:13:15 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Let me add a note, that explains why in Gnulib we continue to use sigprocmask() in many places. 2020-06-28 Bruno Haible doc: Add a note about sigprocmask vs. pthread_sigmask. * doc/posix-functions/sigprocmask.texi: Add note. diff --git a/doc/posix-functions/sigprocmask.texi b/doc/posix-functions/sigprocmask.texi index 20b5405..9b8cae4 100644 --- a/doc/posix-functions/sigprocmask.texi +++ b/doc/posix-functions/sigprocmask.texi @@ -16,3 +16,10 @@ mingw, MSVC 14. Portability problems not fixed by Gnulib: @itemize @end itemize + +Note: Although @code{sigprocmask} officially has undefined behaviour in +multi-threaded programs, in practice it is essentially equivalent to +@code{pthread_sigmask}, with only a difference regarding the error +return convention. It's simpler to use @code{sigprocmask}, since it does +not require linking with @code{-lpthread} on some platforms: +glibc, NetBSD, OpenBSD, AIX, IRIX.