From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 21 11:32:32 2015 Received: (at submit) by debbugs.gnu.org; 21 Nov 2015 16:32:32 +0000 Received: from localhost ([127.0.0.1]:47235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a0B5U-000248-1s for submit@debbugs.gnu.org; Sat, 21 Nov 2015 11:32:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33534) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a091o-0007Ei-8x for submit@debbugs.gnu.org; Sat, 21 Nov 2015 09:20:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a091m-00057p-If for submit@debbugs.gnu.org; Sat, 21 Nov 2015 09:20:35 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:46332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a091m-00057O-E1 for submit@debbugs.gnu.org; Sat, 21 Nov 2015 09:20:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a091l-0008Nr-3R for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 09:20:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a091g-0004ym-0x for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 09:20:33 -0500 Received: from hajek.stat.ubc.ca ([142.103.121.1]:46184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a091f-0004yQ-Oq for bug-gnu-emacs@gnu.org; Sat, 21 Nov 2015 09:20:27 -0500 Received: from krieger (d205-250-210-121.bchsia.telus.net [205.250.210.121]) (authenticated bits=0) by hajek.stat.ubc.ca (8.14.5/8.14.5) with ESMTP id tALEKQXQ023384 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Sat, 21 Nov 2015 06:20:26 -0800 (PST) From: Davor Cubranic To: bug-gnu-emacs@gnu.org Subject: 24.5; Running 'bash -i -c' via shell-command hangs on FreeBSD Date: Sat, 21 Nov 2015 06:20:26 -0800 Message-ID: <86twof1ljp.fsf@telus.net> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sat, 21 Nov 2015 11:32:30 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) On FreeBSD, running: M-x shell-command /usr/local/bin/bash -i -c "echo hello" hangs until you press C-g (twice). I can see the bash process running at 100% via `top` until C-g kills it. Adding `--norc --noprofile` to the command still hangs, so it's not anything about the shell initialization files. The `-i` option is the key: without it, everything works fine. Running the same command via `async-shell-command` does not hang: Bash outputs "hello" in the "*Async Shell Command*" buffer and exits. Both Emacs and Bash are standard FreeBSD 10 binary packages installed via `pkg`. (emacs24-24.5_1,3 and bash-4.3.42, respectively). In GNU Emacs 24.5.1 (amd64-portbld-freebsd10.1, GTK+ Version 2.24.28) of 2015-11-13 on builds.pcbsd.org Windowing system distributor `The X.Org Foundation', version 11.0.11704000 Configured using: `configure --localstatedir=/var --disable-acl --with-dbus --without-file-notification --with-gconf --with-gif --with-gnutls --with-gsettings --with-jpeg --with-m17n-flt --with-imagemagick --with-libotf --with-png --with-toolkit-scroll-bars --with-rsvg --with-tiff --with-x --with-xft --with-xim --with-xml2 --with-xpm --with-x-toolkit=gtk2 --with-sound=oss --x-libraries=/usr/local/lib --x-includes=/usr/local/include --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/share/emacs/info/ --build=amd64-portbld-freebsd10.1 'CFLAGS=-O2 -pipe -fstack-protector -fno-strict-aliasing' CPPFLAGS=-I/usr/local/include 'LDFLAGS= -L/usr/local/lib -Wl,-rpath=/usr/lib:/usr/local/lib -fstack-protector'' Important settings: value of $LC_ALL: en_US.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 71124 7466) (symbols 48 17557 0) (miscs 40 33 88) (strings 32 9070 4601) (string-bytes 1 248833) (vectors 16 8904) (vector-slots 8 382922 19034) (floats 8 63 88) (intervals 56 201 7) (buffers 960 11)) From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 15:55:40 2019 Received: (at 21972) by debbugs.gnu.org; 14 Oct 2019 19:55:40 +0000 Received: from localhost ([127.0.0.1]:41775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iK6RQ-00019R-EN for submit@debbugs.gnu.org; Mon, 14 Oct 2019 15:55:40 -0400 Received: from mail-pf1-f173.google.com ([209.85.210.173]:39187) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iK6RP-00019C-Mj for 21972@debbugs.gnu.org; Mon, 14 Oct 2019 15:55:40 -0400 Received: by mail-pf1-f173.google.com with SMTP id v4so10965190pff.6 for <21972@debbugs.gnu.org>; Mon, 14 Oct 2019 12:55:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=fBr4jzRA6MvGR7QpjtzNCbbhD8UJdUYZt//AU/IznYM=; b=ZlaH1QK/3bILKhYTd83gg+NMgsTA+WsHNpoTk6HZgV9PYHjf0+fyjeCcC6qQ5VijjX YVg6KV5zzlaFRzCTUpNC4pbg4ra5hW2fvwZKCAU067lLfFsMnL3ZkovtmhYyjifmTbeP 0T6dq7Ek8Q2VHmj53ua7wyfJYcK/xpvH66p7vGZPNndUF0Wm1MUpYOB8cyT8IU4omOwo OfpDR9Z2ubPImaC3iu+Dw8aLni0N3WEVYPBPqZovJ8lo8PgX8kvh/IZVCVPaWWu2Cy4A HwrgQRrM8hrYshMqmOnA5wVoLUXOWiDUrrZ6294i1MJGRejRLRPqlA+3BYeARd5PwZN0 JZGQ== X-Gm-Message-State: APjAAAW8o5p7nPLN4O50NIZIxTRRM6f/DQ9a/cf+VBCbYf/6DxA9pUuB fSNCC/2TYenwVq6295r566RGgJ6TYtxJJf0jFZU= X-Google-Smtp-Source: APXvYqwrmUOeRiI3vEiN1rHeC4kGRB017/gHH+ynaYjQdp9iXfXezuaxgUDktc87hGB/DuWKbvDy+5vALq0jAD6P0+k= X-Received: by 2002:a63:c10:: with SMTP id b16mr36346580pgl.333.1571082933715; Mon, 14 Oct 2019 12:55:33 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Mon, 14 Oct 2019 21:55:22 +0200 Message-ID: Subject: Re: bug#21972: 24.5; Running 'bash -i -c' via shell-command hangs on FreeBSD To: Davor Cubranic Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21972 Cc: 21972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Davor Cubranic writes: > On FreeBSD, running: > > M-x shell-command > /usr/local/bin/bash -i -c "echo hello" On GNU/Linux, the above gives me: bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell hello > hangs until you press C-g (twice). I can see the bash process running at > 100% via `top` until C-g kills it. > > Adding `--norc --noprofile` to the command still hangs, so it's not > anything about the shell initialization files. The `-i` option is the > key: without it, everything works fine. > > Running the same command via `async-shell-command` does not hang: Bash > outputs "hello" in the "*Async Shell Command*" buffer and exits. > > Both Emacs and Bash are standard FreeBSD 10 binary packages installed > via `pkg`. (emacs24-24.5_1,3 and bash-4.3.42, respectively). If bash hangs, shouldn't that be reported as a bug in bash instead? Or should Emacs somehow do better with a hanging process? Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 16:09:44 2019 Received: (at 21972) by debbugs.gnu.org; 14 Oct 2019 20:09:44 +0000 Received: from localhost ([127.0.0.1]:41816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iK6f1-0001bs-Su for submit@debbugs.gnu.org; Mon, 14 Oct 2019 16:09:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40263) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iK6ex-0001bZ-LM for 21972@debbugs.gnu.org; Mon, 14 Oct 2019 16:09:40 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iK6es-0004bF-2B; Mon, 14 Oct 2019 16:09:34 -0400 Received: from [176.228.60.248] (port=4128 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iK6er-0001me-Go; Mon, 14 Oct 2019 16:09:33 -0400 Date: Mon, 14 Oct 2019 23:09:28 +0300 Message-Id: <837e57hyx3.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas In-reply-to: (message from Stefan Kangas on Mon, 14 Oct 2019 21:55:22 +0200) Subject: Re: bug#21972: 24.5; Running 'bash -i -c' via shell-command hangs on FreeBSD References: <86twof1ljp.fsf@telus.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 21972 Cc: davor.cubranic@alumni.cs.ubc.ca, 21972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Kangas > Date: Mon, 14 Oct 2019 21:55:22 +0200 > Cc: 21972@debbugs.gnu.org > > Davor Cubranic writes: > > > On FreeBSD, running: > > > > M-x shell-command > > /usr/local/bin/bash -i -c "echo hello" > > On GNU/Linux, the above gives me: > > bash: cannot set terminal process group (-1): Inappropriate ioctl for device > bash: no job control in this shell > hello > > > hangs until you press C-g (twice). I can see the bash process running at > > 100% via `top` until C-g kills it. > > > > Adding `--norc --noprofile` to the command still hangs, so it's not > > anything about the shell initialization files. The `-i` option is the > > key: without it, everything works fine. > > > > Running the same command via `async-shell-command` does not hang: Bash > > outputs "hello" in the "*Async Shell Command*" buffer and exits. > > > > Both Emacs and Bash are standard FreeBSD 10 binary packages installed > > via `pkg`. (emacs24-24.5_1,3 and bash-4.3.42, respectively). > > 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. 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. > Or should Emacs somehow do better with a hanging process? Like what? From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 14 16:50:46 2019 Received: (at 21972) by debbugs.gnu.org; 14 Oct 2019 20:50:46 +0000 Received: from localhost ([127.0.0.1]:41920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iK7Ii-0000br-R1 for submit@debbugs.gnu.org; Mon, 14 Oct 2019 16:50:46 -0400 Received: from mail-pg1-f175.google.com ([209.85.215.175]:42354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iK7Ig-0000bV-5C for 21972@debbugs.gnu.org; Mon, 14 Oct 2019 16:50:42 -0400 Received: by mail-pg1-f175.google.com with SMTP id f14so5632953pgi.9 for <21972@debbugs.gnu.org>; Mon, 14 Oct 2019 13:50:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dGK+rX8RRktzaHrw+By4jwvP8lyQeuw4g0d4+K6HUS0=; b=dB8PrJpXo+PQ8bO8k5mAK9+mF/SjzqX/Y5PQMQIVrPHAw9Su6qZofA91qCcZDV2bOy T41GCoivaDdwosAB7TliSDG3zg1Dgsk+2L2iKxJazkfebaoNa2enpzzF11r5RWwbk1Td iKprGKUZ5E97HpDXOoNMYHgLBHRKyuz0dX3SGKW9covOLg+rtrCm6e5z/TNRHZCMcfN8 Q8UK/Yfve6E/W6GEZfzt0OuZijCI+7QQM8sZxFsmLc/gMpqAMZwmnZkqiaZ9PgIQ4xyd 93hZ9F87afNxPhLb2wvZhBp9gXRt4epeWEAD5AugZoWPoQGPs92xj/PCbZO58eQCSBx3 2HUw== X-Gm-Message-State: APjAAAXZhRFr+xxnbK+R4wciI/jZQFWrjfbdcSC6u8O24brooRd5uB7u cMBOYT16zrHsbn52YCIC0MqEdEv/Aqup7q7wWKM= X-Google-Smtp-Source: APXvYqx+QyzxSie6mWrZMopSiQNL/vvXll+FFpQSwG1WF/UXogW/vcN/GR1Dmp1OjgTwN1gxKOMNiBjYJpXhMgbWgcE= X-Received: by 2002:a63:4046:: with SMTP id n67mr32394977pga.200.1571086234366; Mon, 14 Oct 2019 13:50:34 -0700 (PDT) MIME-Version: 1.0 References: <86twof1ljp.fsf@telus.net> <837e57hyx3.fsf@gnu.org> In-Reply-To: <837e57hyx3.fsf@gnu.org> From: Stefan Kangas Date: Mon, 14 Oct 2019 22:50:22 +0200 Message-ID: Subject: Re: bug#21972: 24.5; Running 'bash -i -c' via shell-command hangs on FreeBSD To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21972 Cc: Davor Cubranic , 21972@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 17 07:21:42 2019 Received: (at 21972) by debbugs.gnu.org; 17 Oct 2019 11:21:42 +0000 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 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 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 Date: Wed, 16 Oct 2019 21:47:24 -0700 From: Davor Cubranic Subject: Re: bug#21972: 24.5; Running 'bash -i -c' via shell-command hangs on FreeBSD To: Stefan Kangas Message-Id: <1571287644.13956.1@smtp.telus.net> In-Reply-To: References: <86twof1ljp.fsf@telus.net> <837e57hyx3.fsf@gnu.org> X-Mailer: geary/0.12-dev MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-TS6G1o13BxrsnRt3qQVr" X-CMAE-Envelope: MS4wfLyXQsPybb85nNRWTiNuCPm5VM/4AEHjH9D4z9k0nR8VsUbXEllNp6Y7BYoSOUXSsHupc4CJZKTnV7Ca/InhWNRS52h7pVx5xi54kbbj2qpqCFMMDZt1 F4Lbnb1e2pqkiJ1O/wYk4/cLo0aFm5b2DBoSn6r+pgr/szXKm/Q0LxHp6NPcvCWLETI/vsYKhGU4Hgypv+7F89QegXYKnuucHX41UdNshtheHcF5+EsY1y92 H5NcQBH2C8OrLZMEPhvrfkVpNE8I1XEuiySbpUx4RFI= X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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. [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.171.16.90 listed in list.dnswl.org] 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] 0.0 HTML_MESSAGE BODY: HTML included in message X-Debbugs-Envelope-To: 21972 X-Mailman-Approved-At: Thu, 17 Oct 2019 07:21:38 -0400 Cc: Eli Zaretskii , 21972@debbugs.gnu.org, Davor Cubranic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-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-- From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 17 07:37:12 2019 Received: (at 21972-done) by debbugs.gnu.org; 17 Oct 2019 11:37:12 +0000 Received: from localhost ([127.0.0.1]:47261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iL45g-0001e3-9w for submit@debbugs.gnu.org; Thu, 17 Oct 2019 07:37:12 -0400 Received: from mail-pf1-f172.google.com ([209.85.210.172]:40756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iL45e-0001dr-KG for 21972-done@debbugs.gnu.org; Thu, 17 Oct 2019 07:37:10 -0400 Received: by mail-pf1-f172.google.com with SMTP id x127so1475749pfb.7 for <21972-done@debbugs.gnu.org>; Thu, 17 Oct 2019 04:37:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B4JMOGQQ+r3ASz7/Qqt3mECvhUbcq6D4ulXjrFxgLig=; b=Z8rHZ5nJsJzxERGjEJhwnaK+ESsmtvRQlekV7+r/JV1mKD9A6rcLOUhyck26YZmpYQ ghXj5BQPW0TiWpYTNsFzTL9TLsX4LHeSxBbQVAz/3O2tui/fxgwLcoOV0CqgHxCvYeoJ AhAQgN7w6bPhP0pkJUGuxOfyVGYFshHH+d/SjteTyiEridnbOMqNs2BQc2449ySyQHa6 TawIjPQW70OgPV95sYAV/CyYLO2EzxPcnX4bITJnD8ku7MKQrA2EzZY+jV71v1YZmDHT sGc4L/zgMZF6B9of6eUk39Z3BnIVUJqEwW/FcXrj0tje+dntSK424uGv39Xuw+XdmeJ+ 6Pbg== X-Gm-Message-State: APjAAAXAnlBZ8PWMXgHL4sTpNYjRzoI2a62cyn/vwN50zFqXnvIAptFm ioV7aki1CIZYSlXfiXf9/vK04koPCGdMcQF7MwM= X-Google-Smtp-Source: APXvYqzjAQxZKc29znkqqTzZIlwUEKxrc/lD1waQe1/uC27mrr71pC/PGpBtUjkRz824sx437Z5czeAIFvwp7DwOawE= X-Received: by 2002:a63:4046:: with SMTP id n67mr3394800pga.200.1571312224617; Thu, 17 Oct 2019 04:37:04 -0700 (PDT) MIME-Version: 1.0 References: <86twof1ljp.fsf@telus.net> <837e57hyx3.fsf@gnu.org> <1571287644.13956.1@smtp.telus.net> In-Reply-To: <1571287644.13956.1@smtp.telus.net> From: Stefan Kangas Date: Thu, 17 Oct 2019 13:36:52 +0200 Message-ID: Subject: Re: bug#21972: 24.5; Running 'bash -i -c' via shell-command hangs on FreeBSD To: Davor Cubranic Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 21972-done Cc: Davor Cubranic , 21972-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Davor Cubranic writes: > 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. Thanks for reporting back. With the above, I'm closing this bug report. Best regards, Stefan Kangas From unknown Mon Jun 23 04:12:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 14 Nov 2019 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator