From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66186: "make lisp/eshell/esh-proc-tests" fails intermittently since 7e50861ca7ed3f620fe62ac6572f6e88b3600ece Date: Mon, 25 Sep 2023 10:43:00 +0300 Message-ID: <838r8u3dh7.fsf@gnu.org> References: <83fs323ldl.fsf@gnu.org> <0bf05269-a8b4-3457-95e1-0c1916f33b22@gmail.com> <83cyy63g1d.fsf@gnu.org> <2625a345-7888-fd0b-2f69-7ca46770a059@cs.ucla.edu> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7044"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jporterbugs@gmail.com, 66186@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 25 09:45:11 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 1qkgHH-0001ZY-1x for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Sep 2023 09:45:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkgGz-00025B-3s; Mon, 25 Sep 2023 03:44:53 -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 1qkgGw-00024y-T7 for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 03:44: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 1qkgGv-0005ZQ-WC for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 03:44:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkgH8-0005h0-6p for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 03:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Sep 2023 07:45: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.169562784921798 (code B ref 66186); Mon, 25 Sep 2023 07:45:02 +0000 Original-Received: (at 66186) by debbugs.gnu.org; 25 Sep 2023 07:44:09 +0000 Original-Received: from localhost ([127.0.0.1]:44038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkgGH-0005fW-0M for submit@debbugs.gnu.org; Mon, 25 Sep 2023 03:44:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkgGE-0005f2-QR for 66186@debbugs.gnu.org; Mon, 25 Sep 2023 03:44:07 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qkgFv-0005QC-Nn; Mon, 25 Sep 2023 03:43:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=e1Tvbnjnlo5vtqp/L1G2v0Ir9o/6pBvFVqhAQqFyuCE=; b=f3Ud+ATSf+fc sj5Q+Ggwr8GnIGCJ5kuq+gOXWEPvAp5RNLCScFOMZkdhOaHR18DfFB9DsOEibyc57Et+W8zuibpDH QiRikHd1hLqLiNpgcC0H75hkTNEYoFK50um4Zxw7TNoi3n806mRNcWFlbHP3h+720b3NuaNcR5fFF t3KWtsB5QQA1iGSN4NgF9QXaX0WtSadOdVFWHFE9YuJKsfKGfRHEW1rqR+IHVH5L5YNbxVcGUo+Zr rf6nLyAso+xzmR57dA2fJuDFmdUX1eUbVeLCYCt/mn4SwN97sjwdo1mirf7alkqb1EEDIrXYgTJ1J fQIOMzm+ueRryKyH9QuGmw==; In-Reply-To: <2625a345-7888-fd0b-2f69-7ca46770a059@cs.ucla.edu> (message from Paul Eggert on Mon, 25 Sep 2023 00:18:02 -0700) 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:271302 Archived-At: > Date: Mon, 25 Sep 2023 00:18:02 -0700 > Cc: jschmidt4gnu@vodafonemail.de, 66186@debbugs.gnu.org > From: Paul Eggert > > 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. I don't think this is about a network subprocess. It's about a real subprocess which runs programs. > 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. Hmm...