2 ms·$BASHPID is not working with subshells prior to Bash v4.by pstadler 12y ago$BASHPID is not working with subshells prior to Bash v4.fensipens 12y ago$BASHPID and $! are two different things.pstadler 12y agoI need to know the PID of the subshell, inside the subshell. $BASHPID was introduced to hold this value. While $$ still contains the PID of the parent process and $! is not available inside the subshell after all.