Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16494

‘command … &’ creates subshell

Path csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Dmitry Alexandrov <dag@gnui.org>
Newsgroups gnu.bash.bug
Subject ‘command … &’ creates subshell
Date Mon, 29 Jun 2020 23:33:49 +0300
Lines 37
Approved bug-bash@gnu.org
Message-ID <mailman.672.1593462839.2574.bug-bash@gnu.org> (permalink)
References <pn9hipci.dag@gnui.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature"
X-Trace usenet.stanford.edu 1593462841 27238 209.51.188.17 (29 Jun 2020 20:34:01 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
X-EA-Auth PI9ZthIq6ODAJomQ9dt1jrwqJJAoegNn2aS5FhJN+0Ht5BkS2AJZ9czQVOMvrL6CIVcAeobMpGenekuVyyddgl7allArnEXf
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
Received-SPF pass client-ip=213.182.54.6; envelope-from=dag@gnui.org; helo=relay-1.mailobj.net
X-detected-operating-system by eggs.gnu.org: First seen = 2020/06/29 14:17:29
X-ACL-Warn Detected OS = Linux 3.1-3.10
X-Spam_score_int -28
X-Spam_score -2.9
X-Spam_bar --
X-Spam_report (-2.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN
X-Spam_action no action
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <pn9hipci.dag@gnui.org>
Xref csiph.com gnu.bash.bug:16494

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Dear maintainer,

I believe, that the current behaviour of GNU Bash:

	$ command cat &
	[1] 3831
	$ ps --pid $! --ppid $!
	  PID TTY          TIME CMD
	 3831 pts/3    00:00:00 bash
	 3832 pts/3    00:00:00 cat

is problematic.  Namely it is:

1) unexpected, as (a) it does not seem to be documented, (b) itʼs counter-intuitive and (c) other bourne-like shells (busybox ash, dash, ksh93, mksh, zsh) does not do that;

2) inconvenient, as in some cases PID of the parent shell is not an appropriate substitute for the PID of the real process.

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

‘command … &’ creates subshell Dmitry Alexandrov <dag@gnui.org> - 2020-06-29 23:33 +0300

csiph-web