[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ‘command … &’ creates subshell
From: |
Dmitry Alexandrov |
Subject: |
Re: ‘command … &’ creates subshell |
Date: |
Wed, 01 Jul 2020 00:43:14 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Eli Schwartz <eschwartz@archlinux.org> wrote:
> Useful replacements:
Thank you. Yes, I have to pick up habit to post known user-level workarounds
along with bugreports.
> If you need to ensure a disk executable is used,
Of course. Why ‘command’ otherwise?
> $ "$(type -P cat)" &
> [1] 2092352
> $ ps --pid $! --ppid $!
> PID TTY TIME CMD
> 2092352 pts/42 00:00:00 cat
Also:
$ (exec cat) &
[1] 31427
$ ps --pid $! --ppid $!
PID TTY TIME CMD
31427 pts/3 00:00:00 cat
Which, IIUC, is somewhat closer to what other shells do, though I cannot come
up with any idea what practical difference it might make.
signature.asc
Description: PGP signature