Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16502
| From | Dmitry Alexandrov <dag@gnui.org> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: ‘command … &’ creates subshell |
| Date | 2020-06-30 23:37 +0300 |
| Message-ID | <mailman.723.1593549466.2574.bug-bash@gnu.org> (permalink) |
| References | <pn9hipci.dag@gnui.org> <ac4a98bd-32f4-5c55-3b8f-1306e9758f54@case.edu> <7dvoi92p.dag@gnui.org> |
[Multipart message — attachments visible in raw view] - view raw
Chet Ramey <chet.ramey@case.edu> wrote:
> On 6/29/20 4:33 PM, Dmitry Alexandrov wrote:
>> 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
I am not saying that this is a bug, only that it is inconsistent with almost any other bourne-like shell.
>> 2) inconvenient, as in some cases PID of the parent shell is not an appropriate substitute for the PID of the real process.
> since the results are correct.
The results are _different_ across shell and, unfortunately, results provided by Bash are the least useful. Consider:
$ command … &
[1] 30737
$ strace -p $!
strace: Process 30737 attached
wait4(-1,
:-/
Back to gnu.bash.bug | Previous | Next | Find similar
Re: ‘command … &’ creates subshell Dmitry Alexandrov <dag@gnui.org> - 2020-06-30 23:37 +0300
csiph-web