On 20-Jul-01 Julian Elischer wrote:
> void
> selrecord(selector, sip)
>         struct proc *selector;
>         struct selinfo *sip;
> {
>         struct proc *p;
>         pid_t mypid;
> 
>         mypid = selector->p_pid;
>         if (sip->si_pid == mypid)
>                 return;
>         if (sip->si_pid && (p = pfind(sip->si_pid))) {
> 
> 
> Why do we look up 'p' when we got it as an argument?
> (race condition detection?)

Err, we look up p when the selector pid isn't the pid in the selinfo.  I.e.,
when we _didn't_ get p as an argument.
 
-- 

John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to