On 19-Dec-01 Alfred Perlstein wrote:
> * Julian Elischer <[EMAIL PROTECTED]> [011218 18:20] wrote:
>> now, what is to say that the process has not exitted by this stage, and
>> been reeped by init (on SMP)
>> particularly since between the two is:
>> * Preserve synchronization semantics of vfork. If waiting for
>> * child to exec or exit, set P_PPWAIT on child, and sleep on our
>> * proc (in case of exit).
>> while (p2->p_flag & P_PPWAIT)
>> msleep(p1, &p2->p_mtx, PWAIT, "ppwait", 0);
>> It may be that due to some semantics of teh fork calls
>> you cannot have P_PPWAIT and a process queued to run on the other
>> processor while reparented to init(1) but I can't see it..
>> the result would be that the return value MIGHT be teh pid
>> of a totally different process if the proc structure had been re-used.
>> Alternatively I could have some good weed here...
> That's not possible, since the parent is waiting the kernel will
> not reparent unless the parent exits, which it doesn't because it's
> waiting for the child.
> You owe the Oracle a large bong rip.
Look at RFNOWAIT silly. It forces a parent to init during fork1() itself.
John Baldwin <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/
"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