From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#66186: "make lisp/eshell/esh-proc-tests" fails intermittently since 7e50861ca7ed3f620fe62ac6572f6e88b3600ece Date: Mon, 25 Sep 2023 00:18:02 -0700 Organization: UCLA Computer Science Department Message-ID: <2625a345-7888-fd0b-2f69-7ca46770a059@cs.ucla.edu> References: <83fs323ldl.fsf@gnu.org> <0bf05269-a8b4-3457-95e1-0c1916f33b22@gmail.com> <83cyy63g1d.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34063"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Cc: 66186@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de To: Eli Zaretskii , Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 25 09:19:09 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qkfs4-0008bk-PA for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Sep 2023 09:19:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkfro-0004HH-JY; Mon, 25 Sep 2023 03:18:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkfrm-0004Gg-9r for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 03:18:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qkfrl-0001IQ-Uy for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 03:18:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkfry-00051U-1Y for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 03:19:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Sep 2023 07:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66186 X-GNU-PR-Package: emacs Original-Received: via spool by 66186-submit@debbugs.gnu.org id=B66186.169562630419255 (code B ref 66186); Mon, 25 Sep 2023 07:19:02 +0000 Original-Received: (at 66186) by debbugs.gnu.org; 25 Sep 2023 07:18:24 +0000 Original-Received: from localhost ([127.0.0.1]:44017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkfrL-00050V-NM for submit@debbugs.gnu.org; Mon, 25 Sep 2023 03:18:23 -0400 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]:59542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkfrJ-00050I-9t for 66186@debbugs.gnu.org; Mon, 25 Sep 2023 03:18:22 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id DF0D23C00D1F0; Mon, 25 Sep 2023 00:18:02 -0700 (PDT) Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ouONEJtMaskp; Mon, 25 Sep 2023 00:18:02 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 89E4D3C00D1FC; Mon, 25 Sep 2023 00:18:02 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 89E4D3C00D1FC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1695626282; bh=P1o5W5dPOarWKitOr3IecNEanb2acAxlFoo+mWZQ8H4=; h=Message-ID:Date:MIME-Version:To:From; b=B4h30dh/0xsSNBDT8cXO6EnIARMsgty2EXf3XSLHVBpKu7JS89ZGTfNKBtxHGinQl JxkiO86EkOLF1Nax4X74LFsIPVm6Akc2pB4AWd+3e+oNWay+xOI/Lg8ovw2C5kOaCN Rsy7Ib3pNijYC6eH0/y5538Clieqtw/ePBLceQ+RLFQRSVBqKpOvqSxFh4WOPruBbO +EjdGRUwA80YSbHFtugsUZB6R7cQmIxNqqYkSho5dLj16UozB/LtHcJ1Cz3iZ8kTlU M7iLAWevl7z+ne/qK0QDfrMLS2/pCAnWvKGKPwjjsEIihJAPunGpjPFGIbMdSrm1Bw uqkrQusXqwu3g== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fMXhKlZxNOLr; Mon, 25 Sep 2023 00:18:02 -0700 (PDT) Original-Received: from [192.168.254.12] (unknown [47.147.225.57]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 589B03C00D1F0; Mon, 25 Sep 2023 00:18:02 -0700 (PDT) Content-Language: en-US In-Reply-To: <83cyy63g1d.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:271299 Archived-At: On 2023-09-24 23:47, Eli Zaretskii wrote: > Perhaps process-send-string should install a temporary SIGPIPE > handler, at least optionally? Paul, WDYT? Sounds like a recipe for bad race conditions. I'm not following the problem closely. However, the usual way to handle this is to use sendto's MSG_NOSIGNAL option (GNU/Linux) or use setsockopt with SO_NOSIGPIPE (the BSDs and macOS). This should prevent those SIGPIPEs from occurring. Alternatively, but this would be a bigger lift, you can arrange for a SIGPIPE signal handler to be enabled all the time, even in batch mode. But then you'll need to resurrect the batch-mode code that used to deal with this sort of thing (and I've forgotten what it is and as I vaguely recall it was a bit buggy but you can look at the change history). The basic idea is that in batch mode, if you ignore SIGPIPE then Emacs should always check for write errors and exit whenever they happen.