Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16502
| 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 | Re: ‘command … &’ creates subshell |
| Date | Tue, 30 Jun 2020 23:37:34 +0300 |
| Lines | 44 |
| Approved | bug-bash@gnu.org |
| 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> |
| 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 1593549467 26680 209.51.188.17 (30 Jun 2020 20:37:47 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | bug-bash@gnu.org |
| To | chet.ramey@case.edu |
| Envelope-to | bug-bash@gnu.org |
| X-EA-Auth | rXvMZ6AqdAj33Y3RECqaYOsg/7B7vd+TY/v/llv/2XSpA20udfmsdjcAhzUSlUMIlB0wsw0PlNcrSQ4U//fid0Hny3OTQ83q |
| In-Reply-To | <ac4a98bd-32f4-5c55-3b8f-1306e9758f54@case.edu> (Chet Ramey's message of "Tue, 30 Jun 2020 12:40:05 -0400") |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
| OpenPGP | id=525F7E60AD812C2361752BB4C8B0F8548EE7F3E7; url=https://openpgpkey.gnui.org/.well-known/openpgpkey/gnui.org/hu/hr4k5tkxm6shwdc18su4bkm34w3dctjd |
| Mail-Copies-To | always |
| Received-SPF | pass client-ip=213.182.54.5; envelope-from=dag@gnui.org; helo=relay-2.mailobj.net |
| X-detected-operating-system | by eggs.gnu.org: First seen = 2020/06/30 16:37:37 |
| X-ACL-Warn | Detected OS = Linux 3.1-3.10 |
| X-Spam_score_int | -18 |
| X-Spam_score | -1.9 |
| X-Spam_bar | - |
| X-Spam_report | (-1.9 / 5.0 requ) BAYES_00=-1.9, 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 | <7dvoi92p.dag@gnui.org> |
| X-Mailman-Original-References | <pn9hipci.dag@gnui.org> <ac4a98bd-32f4-5c55-3b8f-1306e9758f54@case.edu> |
| Xref | csiph.com gnu.bash.bug:16502 |
Show key headers only | View raw
[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