Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16012
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: command_not_found_handle() flaw |
| Date | 2020-03-10 16:04 -0400 |
| Message-ID | <mailman.2430.1583870674.2412.bug-bash@gnu.org> (permalink) |
| References | <CAJOr74gyTOEnYNCG3EPAVJq5VkmJxJ_9tv_TwbmKPBGugdvnWw@mail.gmail.com> <7900c11e-7c5c-1b2b-2ed5-7203bd73c2a9@case.edu> <CAJOr74gZy--_utO8JA8SY8je+tCgfpRZfX_6rkn31euPx2Jbkg@mail.gmail.com> <20200310200429.GB845@eeg.ccf.org> |
On Tue, Mar 10, 2020 at 08:57:26PM +0100, Phi Debian wrote:
> Secondly, if yuio insist on going on the subshell path, then $$ and $PPID
> ought to be setup appropriately, here ther are plain bogus.
wooledg:~$ command_not_found_handle() { echo "\$\$=$$ BASHPID=$BASHPID"; }
wooledg:~$ echo "\$\$=$$ BASHPID=$BASHPID"
$$=859 BASHPID=859
wooledg:~$ wyeiruwyer
$$=859 BASHPID=15619
It looks correct to me. $$ is the PID of the main script, and $BASHPID
is the PID of the subshell.
Back to gnu.bash.bug | Previous | Next | Find similar
Re: command_not_found_handle() flaw Greg Wooledge <wooledg@eeg.ccf.org> - 2020-03-10 16:04 -0400
csiph-web