tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: $$ broken??



On 03/25/13 07:08, Mouse wrote:
>>> The real question I have here is, why is $$ in rc.local giving me
>>> the wrong value?
>> It might be that some shell syntax that runs as a child doesn't
>> update $$.  Things like loops with redirections and script with
>> (...).
> 
> That's ugly.  I don't suppose there's a
> ${$_NO_REALLY_DAMMIT_I_WANT_THE_PID_THATS_ACTUALLY_RUNNING_NOW}?

$BASHPID

Naturally, your shell must be BASH 4.x or later...
It is a perennial problem that took until BASH 4.x to fix.


Home | Main Index | Thread Index | Old Index