PERFORCE change 112893 for review

John Baldwin jhb at freebsd.org
Tue Jan 16 23:03:20 UTC 2007


On Tuesday 16 January 2007 17:24, Divacky Roman wrote:
> On Tue, Jan 16, 2007 at 11:14:44PM +0100, Divacky Roman wrote:
> > On Tue, Jan 16, 2007 at 03:52:36PM -0500, John Baldwin wrote:
> > > On Sunday 14 January 2007 08:53, Roman Divacky wrote:
> > > > http://perforce.freebsd.org/chv.cgi?CH=112893
> > > > 
> > > > Change 112893 by rdivacky at rdivacky_witten on 2007/01/14 13:52:42
> > > > 
> > > > 	Make linux_vfork() actually work. This enables make to work again
> > > > 	with 2.6
> > > 
> > > You should be using RFSTOPPED and starting the new process up after you 
set 
> > > P_PPWAIT before you block to avoid races.
> > 
> > fork1() for vfork does exactly this... I just copied its behaviour. It 
also
> > seems to me to be more correct but fork1() does it this way.
> > 
> > can you look at it?
> 
> I wrong understood what you said.. ignore the previous mail.
> 
> why is it better to set the flag while the p2 process sleeps? the sleeping
> affects p1 (parent) process which will sleep anyway - I dont see any race
> or something. can you explain please?

If p1 is preempted before it sets the flag and p2 runs and exits, then p1 
resumes and sets the flag and goes to sleep, it will never be woken up 
because p2 will have already exited.

-- 
John Baldwin


More information about the p4-projects mailing list