A variável interna $BASHPID
foi introduzida na versão 4.0 do bash.
Veja o arquivo NEWS
no código-fonte do bash:
397 -------------------------------------------------------------------------------
398 This is a terse description of the new features added to bash-4.0 since
399 the release of bash-3.2. As always, the manual page (doc/bash.1) is
400 the place to look for complete descriptions.
401
402 1. New Features in Bash
403
...
410 c. There is a new variable, $BASHPID, which always returns the process id of
411 the current shell.