[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: command_not_found_handle() flaw

From: Greg Wooledge
Subject: Re: command_not_found_handle() flaw
Date: Tue, 10 Mar 2020 16:04:29 -0400
User-agent: Mutt/1.10.1 (2018-07-13)

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]