From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by sourceware.org (Postfix) with ESMTPS id DD8F2393BC05 for ; Tue, 22 Jun 2021 19:00:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DD8F2393BC05 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f44.google.com with SMTP id b3so14607749wrm.6 for ; Tue, 22 Jun 2021 12:00:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=58bDXqxmH+HvKbkokAxC0UZRBZY+mXYhlPtiaNAipA8=; b=t3T0saacSUuAV8kFKOUwVS4IXOP1gkIqsrakhhN1K1Y1gFTLeVg63o9esCCBI/TMez gKy96jmxFM3GN7sC5TPnmjW23Zn49dCEI1pLO0rdxoZV6pbAgY6wRoMY2u0/VV95dhR7 0fn5rB8uNyTGwstrbMblksKQghKQkv24/0OtiJIQtoT4hKUYbisunxt7pTMsEtU2OTej /JPso4WVvSs2bCacr6sWljNlH7ycHcVE9LgRG1wpc4HDWBTl27CtrCjbsey9Ht2j6I6J iTl9yH+8WujAoZLZyTqYUM4hbTDA5wHpGuIBA89ug/hHb0PZMsgtpIiegPqoX2RZvn9V YgkA== X-Gm-Message-State: AOAM531Sa3uggRIHuHAITxo+3ZvMva4KPB16ZWH35/mMaU0MWMu+NJid ycf8yxqjmSCCBAGjv+5JsvPFDkPiLUSdDA== X-Google-Smtp-Source: ABdhPJzugoVmQJeOjvIiSRR18g7evDTnFdseTJU7SlUZOyXNRYsRc25ro/+TXM+j4XkQt6k/eCdPow== X-Received: by 2002:a5d:6985:: with SMTP id g5mr6890712wru.396.1624388433226; Tue, 22 Jun 2021 12:00:33 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:6b6e:c7b6:c5a7:aac3? ([2001:8a0:f932:6a00:6b6e:c7b6:c5a7:aac3]) by smtp.gmail.com with ESMTPSA id v18sm273419wrv.24.2021.06.22.12.00.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Jun 2021 12:00:32 -0700 (PDT) Subject: Re: [PATCH] Fix scoped_ignore_sigpipe selftest on systems with BSD signal semantics From: Pedro Alves To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20210617185545.3826154-1-pedro@palves.net> <87a6niuhzs.fsf@tromey.com> Message-ID: Date: Tue, 22 Jun 2021 20:00:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87a6niuhzs.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2021 19:00:36 -0000 On 2021-06-22 2:49 p.m., Tom Tromey wrote: > Pedro> Fix this by using sigaction. I'm not adding the usual #ifdef > Pedro> HAVE_SIGACTION goo, because I really want to believe that all systems > Pedro> that support SIGPIPE support sigaction nowadays. GNU/Linux, Hurd, > Pedro> BSDs, macOS, Cygwin, DJGPP, AIX, etc., anything resembling a modern > Pedro> Unix does support it AFAIK, only mingw does not support it, but OTOH, > Pedro> it also doesn't define SIGPIPE. Confirmed by cross building GDB for > Pedro> mingw-w64. > > gnulib seems to agree: > > https://www.gnu.org/software/gnulib/manual/html_node/sigprocmask.html > Thanks, I didn't remember to check that. That's the sigprocmask page, but the sigaction one (which no doubt you meant to paste) is similar. > Pedro> We could probably remove the HAVE_SIGPROCMASK check too, actually. > > Sounds good. I'll try to remember to do that soon.