On Thursday, April 11, 2013 01:05:43 PM Lenga, Yair wrote:
> With BASH 3.0, the backgrounded task could access the PID of the parent using
> "$$", and the PID Of itself as "$!".
> 
> With BASH 4.0, the script fail, the "$!" is not available to the child
> process.
> 
> Is it possible to add back the functionality to allow the child process to
> somehow retrieve it's OWN PID.  I assume that the behavior of  "$$" cannot be
> modified at this time.

BASHPID was introduced in Bash 4. I would guess that prior to that, the
behavior of $! was either a nonstandard extension or unintentional bug. Check
the changelog.

-- 
Dan Douglas

Reply via email to