On 02/03/2013 01:12 AM, Ulrich Mueller wrote:
>>>>>> On Sun, 3 Feb 2013, Ryan Hill wrote:
> 
>> We have eclasses that require Bash 4 (eg. multiprocessing.eclass
>> uses BASHPID).
> 
> I wonder why it would be needed there. Doesn't $$ work?

In a subshell, I think $$ is the pid of the parent shell, while BASHPID
is the real pid of the current subshell. Test cases:

$ echo $$
24996
$ ( echo $$ )
24996
$ echo ${BASHPID}
24996
$ ( echo ${BASHPID} )
25006

However, multiprocessing.eclass does not appear to do anything with the
pid anyway. Inside multijob_finish_one it reads the pid from the pipe
and does nothing with it.
-- 
Thanks,
Zac

Reply via email to