From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jens Schmidt via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66186: "make lisp/eshell/esh-proc-tests" fails intermittently since 7e50861ca7ed3f620fe62ac6572f6e88b3600ece Date: Thu, 28 Sep 2023 22:33:28 +0200 Message-ID: <87fs2y6ns7.fsf@sappc2.fritz.box> References: <83fs323ldl.fsf@gnu.org> <0bf05269-a8b4-3457-95e1-0c1916f33b22@gmail.com> <83cyy63g1d.fsf@gnu.org> <972583d0-a054-bc87-3227-0d52be405212@gmail.com> Reply-To: Jens Schmidt Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18559"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: Eli Zaretskii , Paul Eggert , 66186@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 28 22:35:17 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 1qlxjA-0004TJ-U0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Sep 2023 22:35:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlxik-00030m-31; Thu, 28 Sep 2023 16:34:50 -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 1qlxii-00030Y-MD for bug-gnu-emacs@gnu.org; Thu, 28 Sep 2023 16:34:48 -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 1qlxii-0005W2-Du for bug-gnu-emacs@gnu.org; Thu, 28 Sep 2023 16:34:48 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qlxiw-0007Ke-DL for bug-gnu-emacs@gnu.org; Thu, 28 Sep 2023 16:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jens Schmidt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Sep 2023 20:35: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.169593325228108 (code B ref 66186); Thu, 28 Sep 2023 20:35:02 +0000 Original-Received: (at 66186) by debbugs.gnu.org; 28 Sep 2023 20:34:12 +0000 Original-Received: from localhost ([127.0.0.1]:54630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlxi8-0007JH-0X for submit@debbugs.gnu.org; Thu, 28 Sep 2023 16:34:12 -0400 Original-Received: from mr4.vodafonemail.de ([145.253.228.164]:44314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlxi3-0007Ii-Hl for 66186@debbugs.gnu.org; Thu, 28 Sep 2023 16:34:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1695933226; bh=4sf7NzhWmo1nLeKjqzTYh3T4AaES77CrTeZ+ovJR8y4=; h=From:To:Subject:References:Date:In-Reply-To:Message-ID:User-Agent: Content-Type:From; b=EuvepIEFf6vca7+7+13hkNUbGtA9Ebxi3RPDTJb5e2y45nWf1F17nGdFgUUAIPCXi BMu/Wwth0++YM4r1zOISiVsCEM8QGnlqdAoBnMrqsDjDfp3yiFVeNjfZyeKhwLqJnp tvtDDSmVjb75BhdTmVr/QQwFh/pXiVueaPzzatnw= Original-Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr4.vodafonemail.de (Postfix) with ESMTPS id 4RxQDV4LN6z1xvG; Thu, 28 Sep 2023 20:33:46 +0000 (UTC) Original-Received: from sappc2 (port-92-194-43-39.dynamic.as20676.net [92.194.43.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4RxQDD4bt9z9s5l; Thu, 28 Sep 2023 20:33:29 +0000 (UTC) In-Reply-To: <972583d0-a054-bc87-3227-0d52be405212@gmail.com> (Jim Porter's message of "Mon, 25 Sep 2023 12:12:23 -0700") X-purgate-type: clean X-purgate: clean X-purgate-size: 1708 X-purgate-ID: 155817::1695933222-14FF4E22-F955D43C/0/0 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:271452 Archived-At: Jim Porter writes: > On 9/24/2023 11:47 PM, Eli Zaretskii wrote: > >> That's always a good thing, thanks. > > ... I've also done this. Now the regression tests should just > avoid the possibility of a SIGPIPE, which will hopefully resolve > this bug. > > Jens, could you try this version out to make sure the tests pass > reliably for you? They do pass reliably now, thanks. TBH, I initially didn't read your commit message and, hence, failed to understand that `printnl' without parameters prints nothing - I thought it would print at least a newline, which seemed to me like pushing the race condition just further down the line. So how about using something that more explicitly does not print anything? Like, for example `(ignore)', which also seems to generate no output? (Actually, I also tested a variant where that shell statement simply slurps its stdin, like generated by this function: (defun esh-proc-test--detect-pty-cmd (&optional read-input) "Generate a shell command that prints the standard stream status. The generated shell command prints the standard streams which are connected as TTYs. If READ-INPUT is present and non-nil and Emacs is in batch mode the generated command gobbles up stdin to avoid SIGPIPE errors." (concat "sh -c '" "if [ -t 0 ]; then echo stdin; fi; " "if [ -t 1 ]; then echo stdout; fi; " "if [ -t 2 ]; then echo stderr; fi; " (when (and read-input noninteractive) ;; Read stdin using only shell built-ins. "while read dummy; do :; done; ") "'")) But simply not printing to the pipe is of course, well, simpler.)