From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Davor Cubranic Newsgroups: gmane.emacs.bugs Subject: bug#21972: 24.5; Running 'bash -i -c' via shell-command hangs on FreeBSD Date: Wed, 16 Oct 2019 21:47:24 -0700 Message-ID: <1571287644.13956.1@smtp.telus.net> References: <86twof1ljp.fsf@telus.net> <837e57hyx3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-TS6G1o13BxrsnRt3qQVr" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="129350"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 21972@debbugs.gnu.org, Davor Cubranic To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 17 13:22:16 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iL3rE-000XUw-4j for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Oct 2019 13:22:16 +0200 Original-Received: from localhost ([::1]:44104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL3rC-000674-02 for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Oct 2019 07:22:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45743) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL3r1-00063d-US for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 07:22:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iL3r0-0005Uk-Ie for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 07:22:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38422) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iL3r0-0005Ua-95 for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 07:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iL3r0-0007fy-57 for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 07:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Davor Cubranic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Oct 2019 11:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21972 X-GNU-PR-Package: emacs Original-Received: via spool by 21972-submit@debbugs.gnu.org id=B21972.157131130229466 (code B ref 21972); Thu, 17 Oct 2019 11:22:02 +0000 Original-Received: (at 21972) by debbugs.gnu.org; 17 Oct 2019 11:21:42 +0000 Original-Received: from localhost ([127.0.0.1]:47241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iL3qf-0007fB-Kf for submit@debbugs.gnu.org; Thu, 17 Oct 2019 07:21:42 -0400 Original-Received: from cmta17.telus.net ([209.171.16.90]:38566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKxhB-0005w5-CP for 21972@debbugs.gnu.org; Thu, 17 Oct 2019 00:47:30 -0400 Original-Received: from [192.168.1.76] ([108.172.7.229]) by cmsmtp with SMTP id Kxh6iNw62bg38Kxh8iBEJ8; Wed, 16 Oct 2019 22:47:28 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=neo; t=1571287648; bh=MDsYoeiat6DbHJKbtYQkm574BbSnMLVtANnQzbXUTtQ=; h=Date:From:Subject:To:Cc:In-Reply-To:References; b=1p7DzbhXGQvurEH8lwMXJgxvWMee+mekvNgT+aFjAuU0YZyJ1Ig7nidvAQ2BVK5KA HhUSHBK3Pyb6HMpXG3G4COixdnVb2VDvGuSVV4+rJsPLvlFt6AUXO7bKVwtX4Xk9ul mcIIF8R6dAVHAeL4vj4w2TcsYntA1ozZWiEcPwq1I5CE4EvrDKDTqUpbe67X1WhAtg 2a/7WBUjRF86X9Q7G3lLuFJak/CditUYZ/k5mp0IhoCZ+vkJoCgP9S0ya4QTLCMLWY uDfggG8769Y95ngZg/6WiSOkJS8INBrYDojMCfmrFNjzWHDcm5R9xnqhNqL+liuBPB 8tvfFizF7SD5Q== X-Telus-Authed: ZGF2b3JAdGVsdXMubmV0 X-Authority-Analysis: v=2.3 cv=O/1HQy1W c=1 sm=1 tr=0 a=QUUviwcJpPypGKkQCbJ+iQ==:117 a=QUUviwcJpPypGKkQCbJ+iQ==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=CI8T1PptAAAA:20 a=mDV3o1hIAAAA:8 a=aAJK9bKxObLAn0LzOxUA:9 a=CjuIK1q_8ugA:10 a=179LUgrpvYK7uhwoVeYA:9 a=lknNEI-bkDY2UB6z:21 a=_FVE-zBwftR9WsbkzFJk:22 In-Reply-To: X-Mailer: geary/0.12-dev X-CMAE-Envelope: MS4wfLyXQsPybb85nNRWTiNuCPm5VM/4AEHjH9D4z9k0nR8VsUbXEllNp6Y7BYoSOUXSsHupc4CJZKTnV7Ca/InhWNRS52h7pVx5xi54kbbj2qpqCFMMDZt1 F4Lbnb1e2pqkiJ1O/wYk4/cLo0aFm5b2DBoSn6r+pgr/szXKm/Q0LxHp6NPcvCWLETI/vsYKhGU4Hgypv+7F89QegXYKnuucHX41UdNshtheHcF5+EsY1y92 H5NcQBH2C8OrLZMEPhvrfkVpNE8I1XEuiySbpUx4RFI= X-Mailman-Approved-At: Thu, 17 Oct 2019 07:21:38 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:169556 Archived-At: --=-TS6G1o13BxrsnRt3qQVr Content-Type: text/plain; charset=us-ascii; format=flowed I should have mentioned this in the report, but I believe this was, at the time I filed it, a minimal example reproducing why using package "exec-path-from-shell" [1] on FreeBSD caused Emacs to hang. (I had used it on Mac, and then ran into the bug when I copied my .emacsrc to a new FreeBSD machine.) You can blame the package, or bash, or me for passing "-i" argument to bash, but to me it looked like it was Emacs that was doing something funny to the subprocess being executed to cause it to lock up -- and to do this only on FreeBSD. I can't reproduce this now because I don't use FreeBSD any more, and as Eli said in the four years since the bug was filed both Emacs and Bash have moved on, so feel free to close the report. [1]: https://github.com/purcell/exec-path-from-shell Davor On Mon, 14 Oct, 2019 at 1:50 PM, Stefan Kangas wrote: > Eli Zaretskii writes: > >> > If bash hangs, shouldn't that be reported as a bug in bash >> instead? >> >> It's possible that your Bash is newer, and this bug was fixed since >> then. > > True. > >> In general, it sounds like Bash tries to read from its stdin, and in >> call-process that is... what? By contrast, by default we >> communicate >> with async subprocess via PTYs (on Posix hosts), which is what Bash >> expects in an interactive session. >> >> IOW, I cannot understand why would someone call "bash -i" in a >> non-interactive command. > > Indeed. > >> > Or should Emacs somehow do better with a hanging process? >> >> Like what? > > No idea, that's why I'm asking. But if you don't know either, then I > guess that means that there is nothing to do here; and this is not a > bug in Emacs. > > Best regards, > Stefan Kangas --=-TS6G1o13BxrsnRt3qQVr Content-Type: text/html; charset=us-ascii
I should have mentioned this in the report, but I believe this was, at the time I filed it, a minimal example reproducing why using package "exec-path-from-shell" [1] on FreeBSD caused Emacs to hang. (I had used it on Mac, and then ran into the bug when I copied my .emacsrc to a new FreeBSD machine.)

You can blame the package, or bash, or me for passing "-i" argument to bash, but to me it looked like it was Emacs that was doing something funny to the subprocess being executed to cause it to lock up -- and to do this only on FreeBSD.

I can't reproduce this now because I don't use FreeBSD any more, and as Eli said in the four years since the bug was filed both Emacs and Bash have moved on, so feel free to close the report.


Davor

On Mon, 14 Oct, 2019 at 1:50 PM, Stefan Kangas <stefan@marxist.se> wrote:
Eli Zaretskii <eliz@gnu.org> writes:
> If bash hangs, shouldn't that be reported as a bug in bash instead? It's possible that your Bash is newer, and this bug was fixed since then.
True.
In general, it sounds like Bash tries to read from its stdin, and in call-process that is... what? By contrast, by default we communicate with async subprocess via PTYs (on Posix hosts), which is what Bash expects in an interactive session. IOW, I cannot understand why would someone call "bash -i" in a non-interactive command.
Indeed.
> Or should Emacs somehow do better with a hanging process? Like what?
No idea, that's why I'm asking. But if you don't know either, then I guess that means that there is nothing to do here; and this is not a bug in Emacs. Best regards, Stefan Kangas
--=-TS6G1o13BxrsnRt3qQVr--