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


Groups > gnu.bash.bug > #16500

Re: ‘command … &’ creates subshell

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: ‘command … &’ creates subshell
Date 2020-06-30 12:40 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.718.1593535215.2574.bug-bash@gnu.org> (permalink)
References <pn9hipci.dag@gnui.org> <ac4a98bd-32f4-5c55-3b8f-1306e9758f54@case.edu>

Show all headers | View raw


On 6/29/20 4:33 PM, Dmitry Alexandrov wrote:
> 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;

It's an opportunity for optimization, not a bug, since the results are
correct.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

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


Thread

Re: ‘command … &’ creates subshell Chet Ramey <chet.ramey@case.edu> - 2020-06-30 12:40 -0400

csiph-web