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.devel Subject: Re: esh-proc test failures Date: Mon, 22 Aug 2022 21:56:43 +0300 Message-ID: <838rng9kes.fsf@gnu.org> References: <166036758418.2203.8730240669199078524@vcs2.savannah.gnu.org> <20220813051305.6667BC09BFE@vcs2.savannah.gnu.org> <87o7wmg0nx.fsf_-_@gnus.org> <30a7e3aa-ad52-325f-4fcd-528aade4a339@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36972"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 22 21:04:02 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oQCiQ-0009T1-5b for ged-emacs-devel@m.gmane-mx.org; Mon, 22 Aug 2022 21:04:02 +0200 Original-Received: from localhost ([::1]:58308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQCiP-0002Q8-1f for ged-emacs-devel@m.gmane-mx.org; Mon, 22 Aug 2022 15:04:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQCbI-0005sJ-DZ for emacs-devel@gnu.org; Mon, 22 Aug 2022 14:56:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59858) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQCbI-0006PF-3D; Mon, 22 Aug 2022 14:56:40 -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=2Wicvp9W9y4Lzafd5sb3iNKwFbsT0pTNinX9kXdawrI=; b=SH2MtFYBwkcg Og7FRmGm3nPDkFqhUEeo8yGVRsU6ONBezPUpAsHH8mmtQ7F0Te0FhntV6/McuaivI8FQyRtd7yFHb naGLBzIFlmiwk/yN7Va0T1zLozLH+ClMXxiP1+iER0K2EnCzSve6Dlm4tM07FwLv8mu3dItIh3d+r kQyIsO5oPzILR/WB8N6yfkkJj2gCRyYexuPkxH9LOTDrqjA9s+SS61u30vkDZWd58KBZvGmlYGqhf q+v6vV+SUB5rAhlhT6/Vcyv3GbTAGXyA9MAGLW+HHV7rojoby8hdEZY0gIp+7EXIKrn7fmMrOkQA3 s+UEFHvZz/kzFDCptacmqg==; Original-Received: from [87.69.77.57] (port=2997 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQCbH-0000rt-2o; Mon, 22 Aug 2022 14:56:39 -0400 In-Reply-To: (message from Jim Porter on Mon, 22 Aug 2022 10:06:36 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:293813 Archived-At: > From: Jim Porter > Cc: emacs-devel@gnu.org > Date: Mon, 22 Aug 2022 10:06:36 -0700 > > diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el > index 2f77f3f497..d5cc3706fd 100644 > --- a/lisp/eshell/esh-cmd.el > +++ b/lisp/eshell/esh-cmd.el > @@ -1347,6 +1347,10 @@ eshell-exec-lisp > (apply func-or-form args))))) > (and result (funcall printer result)) > result) > + (eshell-pipe-broken > + ;; 141 is 128 + 13 (the numeric value of SIGPIPE). > + (setq eshell-last-command-status 141) > + nil) This is non-portable, I think on two counts: . the assumption that the exit code is the signal number left-shifted by N bits (btw, isn't N = 8, not 7?) . the assumption that SIGPIPE is signal 13 (does Posix mandate that?) What do we expect to happen here on MS-Windows and other non-Posix platforms, where both of the above assumptions are false?