From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#66186: "make lisp/eshell/esh-proc-tests" fails intermittently since 7e50861ca7ed3f620fe62ac6572f6e88b3600ece Date: Sun, 24 Sep 2023 22:47:58 -0700 Message-ID: References: <83fs323ldl.fsf@gnu.org> <0bf05269-a8b4-3457-95e1-0c1916f33b22@gmail.com> 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="24397"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66186@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 25 07:49:14 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 1qkeT4-0006Fi-3s for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Sep 2023 07:49:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkeSi-0000Gc-94; Mon, 25 Sep 2023 01:48: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 1qkeSg-0000GA-F6 for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 01:48: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 1qkeSf-0006Jb-UX for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 01:48:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkeSr-0002et-Rc for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 01:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Sep 2023 05:49:01 +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.16956209009976 (code B ref 66186); Mon, 25 Sep 2023 05:49:01 +0000 Original-Received: (at 66186) by debbugs.gnu.org; 25 Sep 2023 05:48:20 +0000 Original-Received: from localhost ([127.0.0.1]:43932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkeSB-0002ao-RR for submit@debbugs.gnu.org; Mon, 25 Sep 2023 01:48:20 -0400 Original-Received: from mail-oa1-x34.google.com ([2001:4860:4864:20::34]:51337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkeS9-0002Zt-4a for 66186@debbugs.gnu.org; Mon, 25 Sep 2023 01:48:18 -0400 Original-Received: by mail-oa1-x34.google.com with SMTP id 586e51a60fabf-1dd0526b5easo1509133fac.2 for <66186@debbugs.gnu.org>; Sun, 24 Sep 2023 22:48:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695620878; x=1696225678; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=sVpoHdOIm5FCmRylNAUkbclfbsSgEO4sr9VN7eAnWfM=; b=EQ4xqtoMU4E7OJY4js8poRt4Td9oSZagc3Jqu4b2a+sOqV8bZD7a7DaAnnFZeTQAU6 4useS0wmeyU7vCTY7gXVGbCUmE9iIASRXJ5ICALvI+m4ITYr3sGxHi527GYXQDjwM/fU Y0kwGR30CvNjbWgi7Fmas70zyqDzA1IIbiIAIKiLulbTOZmCXVOf+JW7lEVotW3U8Kks Yor9xK5llteutT6X2oBGFQWyrfNxpwRNfC/nIxSthFGfewSfUhd0QN8JuGZMXS03Z+5C kmxlMOUcW7sxWLK7gAp7N5cB2Ac7EerW8AUG4zK3y9tt6a7JGbNdQwhAIKZjATa7SZHU 90ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695620878; x=1696225678; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sVpoHdOIm5FCmRylNAUkbclfbsSgEO4sr9VN7eAnWfM=; b=StW3N4xKeo3CJAHJv5M6QotQH3K8wOyXrIKwng0pl+tjyM974c8+JhhAYwZh90X64+ 5iFbGkiPx2xyBCItJxbWnzIVR7vUJAiXp09GV3swhB+GtXsKnsywEkxJFxrEyHVYnOHK KrUzmzZ63qmvSshibpQkidKAlDdhIwqxkVCdVDhi0vPGaACHN6jaGK7eb6CxDfbmlfOo j//at0wqKGYiwiIHD/EY+S4jxE+NgnOa55Li+SZGnDn3k50XyJXfR0GHZZZvfgAfsC3h PZe1GnBaEgOyC+zVufmv1sAiIxu1IjEylySuBeqG6z4vMKQz/kpLpuenjrzmntUI8J8v mySg== X-Gm-Message-State: AOJu0YxcKTu3+0h+kRuAciVHQ74KDw13UUNq2zTceglRTbzR1iwu7JOT jxedYHtVSFT6NU2JQYnQxzo= X-Google-Smtp-Source: AGHT+IHAgvTodD2Oh28dn5yiNzSluEiCu08nQKQjYFvALlWDXMuzl74bRbtHAANP3vrwo3guGbvFXQ== X-Received: by 2002:a05:6870:c691:b0:1b0:b13:c16 with SMTP id cv17-20020a056870c69100b001b00b130c16mr7738203oab.2.1695620878012; Sun, 24 Sep 2023 22:47:58 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id bu20-20020a632954000000b0057c29fec795sm6816762pgb.37.2023.09.24.22.47.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 Sep 2023 22:47:57 -0700 (PDT) Content-Language: en-US In-Reply-To: <0bf05269-a8b4-3457-95e1-0c1916f33b22@gmail.com> 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:271296 Archived-At: On 9/24/2023 10:34 PM, Jim Porter wrote: > On 9/24/2023 9:52 PM, Eli Zaretskii wrote: >> In batch mode, SIGPIPE is not ignored by Emacs, see init_signals. >> This was changed 11 years ago, see commit 4d7e6e51dd. > > Thanks, I didn't realize that. > >> Perhaps Eshell should check that the process is still alive before >> calling process-send-string? > > Ok, how about this? Jens, could you try this patch out to see if it > fixes things for you? I forgot to add: Is there potential for a race condition here? I think I'd written it the other way because there's a chance that the process exits in between checking 'process-live-p' and calling 'process-send-string'. I guess we could check liveness both before *and* after 'process-send-string'. That would probably still leave a small chance of the regression tests crashing though, which isn't great. I could probably also write the test to avoid this race condition entirely, since it's not actually trying to trigger a SIGPIPE (though in general, Eshell should do the right thing in response to SIGPIPE). That would make the regression tests happy.