On Thu, Apr 11, 2013 at 04:15:45PM +0000, Lenga, Yair wrote:
> + The man page list BASH_VERSION, etc., but no indication of BASHPID. It's
> probably a good idea to put a note next to '$!' about BASHPID.
It is certainly in the man page:
BASHPID
Expands to the process ID of the current bash process. This
differs from $$ under certain circumstances, such as subshells
that do not require bash to be re-initialized.
> + Could not find any change log on my system (probably a problem with RH).
> Not sure if it's documented.
Debian installs this file as /usr/share/doc/bash/CHANGES.gz (no idea where
Red Hat puts it).
The relevant entry is this one:
c. There is a new variable, $BASHPID, which always returns the process id of
the current shell.
This appears in the section for bash-4.0-alpha.