From owner-p4-projects@FreeBSD.ORG Tue Jan 16 23:03:20 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 58EB216A49E; Tue, 16 Jan 2007 23:03:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2A25316A47C; Tue, 16 Jan 2007 23:03:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id C696B13C442; Tue, 16 Jan 2007 23:03:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id l0GN3GKx047831; Tue, 16 Jan 2007 18:03:18 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Divacky Roman Date: Tue, 16 Jan 2007 18:03:11 -0500 User-Agent: KMail/1.9.1 References: <200701141353.l0EDr4Bn085459@repoman.freebsd.org> <20070116221444.GA10264@stud.fit.vutbr.cz> <20070116222455.GA11360@stud.fit.vutbr.cz> In-Reply-To: <20070116222455.GA11360@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200701161803.12044.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 16 Jan 2007 18:03:18 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2457/Tue Jan 16 06:53:04 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Roman Divacky , Perforce Change Reviews Subject: Re: PERFORCE change 112893 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2007 23:03:20 -0000 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@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