Re: Is this a bug in the fork() code?

2001-12-18 Thread Alfred Perlstein
* John Baldwin <[EMAIL PROTECTED]> [011218 18:41] wrote: > > Actually, it's a bit worse than that. The parent process will sleep on itself > waiting to be woken up, but when the child exits, it will wake up init > (p->p_pptr) not the waiting process, so if you do a rfork(..., RFNOWAIT | > RFPPWA

Re: Is this a bug in the fork() code?

2001-12-18 Thread John Baldwin
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 sync

RE: Is this a bug in the fork() code?

2001-12-18 Thread John Baldwin
On 19-Dec-01 John Baldwin wrote: >> 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 total

RE: Is this a bug in the fork() code?

2001-12-18 Thread John Baldwin
On 19-Dec-01 Julian Elischer wrote: > Near the end of fork1(): > /* > * If RFSTOPPED not requested, make child runnable and add to > * run queue. > */ > microtime(&(p2->p_stats->p_start)); > p2->p_acflag = AFORK; > if ((flags & RFSTOPPED) =

Re: Is this a bug in the fork() code?

2001-12-18 Thread Alfred Perlstein
* 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

Is this a bug in the fork() code?

2001-12-18 Thread Julian Elischer
Near the end of fork1(): /* * If RFSTOPPED not requested, make child runnable and add to * run queue. */ microtime(&(p2->p_stats->p_start)); p2->p_acflag = AFORK; if ((flags & RFSTOPPED) == 0) { mtx_lock_spin(&sched_lock);