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 09:47:42 +0300 Message-ID: <83cyy63g1d.fsf@gnu.org> References: <83fs323ldl.fsf@gnu.org> <0bf05269-a8b4-3457-95e1-0c1916f33b22@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40813"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66186@debbugs.gnu.org, jschmidt4gnu@vodafonemail.de To: Jim Porter , Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 25 08:49: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 1qkfP3-000AIX-Qw for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 25 Sep 2023 08:49:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkfOm-0007aZ-2B; Mon, 25 Sep 2023 02:48: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 1qkfOk-0007aQ-Fv for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 02: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 1qkfOk-0001pQ-7Z for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 02:48:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkfOw-0004Gb-2y for bug-gnu-emacs@gnu.org; Mon, 25 Sep 2023 02:49: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 06:49: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.169562451716311 (code B ref 66186); Mon, 25 Sep 2023 06:49:02 +0000 Original-Received: (at 66186) by debbugs.gnu.org; 25 Sep 2023 06:48:37 +0000 Original-Received: from localhost ([127.0.0.1]:44003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkfOX-0004F0-Eb for submit@debbugs.gnu.org; Mon, 25 Sep 2023 02:48:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkfOS-0004Ds-Pa for 66186@debbugs.gnu.org; Mon, 25 Sep 2023 02:48:36 -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 1qkfOA-0001is-AX; Mon, 25 Sep 2023 02:48:14 -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=lJ5WqvBbfGF9tI0B6ICX6HayJlJYB2rBzP/U1Bkz1HE=; b=TX/f4A/bvC4v xD/A/CHsOPh4QmQrVkLkdCZfhlnnMXzMaCa1zH/kxQtOykKDRS/T58191j8aK1BoVRNST2rMEA+sB sjhEVmYkPOEhNpvBKWKEUKYJdXtQIxEDhhQCEvFY/mDqAMCtdbSnvgn4DNcTRLoU5Vr+ad2eeZuDk WWK6sXhlc/qAHcv5KHIYKjK9M+2bzAWIpycv6F/LqI4T6jw5XuuTe0dyOYsW8TgjMjEClsQxNzTrZ M3I1VdtHBrSX/0FU+X0oYlZu2BswNlw4hD8m56Dq3H+LcsDu4XxYLGP++XGkyMVxa807U8X8t5YVw yfKxlbMLptOXKOSp+CiZ2A==; In-Reply-To: (message from Jim Porter on Sun, 24 Sep 2023 22:47:58 -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:271297 Archived-At: > Date: Sun, 24 Sep 2023 22:47:58 -0700 > From: Jim Porter > Cc: jschmidt4gnu@vodafonemail.de, 66186@debbugs.gnu.org > > >> 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'. Yes, and therefore I think you should also keep the old code that wrapped the call in condition-case. > 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. Perhaps process-send-string should install a temporary SIGPIPE handler, at least optionally? Paul, WDYT? > 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. That's always a good thing, thanks.