From owner-cvs-all Mon Mar 12 15: 0:30 2001 Delivered-To: cvs-all@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id CC3C437B719; Mon, 12 Mar 2001 15:00:24 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f2CMxjA92030; Mon, 12 Mar 2001 14:59:45 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Mon, 12 Mar 2001 14:59:28 -0800 (PST) From: John Baldwin To: Dag-Erling Smorgrav Subject: Re: cvs commit: src/sys/alpha/linux linux_machdep.c Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 12-Mar-01 Dag-Erling Smorgrav wrote: > John Baldwin writes: >> On 11-Mar-01 Dag-Erling Smorgrav wrote: >> > This commit is wrong: rfork() masks away RFSTOPPED, so fork1() queues >> > the process, then linux_clone() queues it once again. This would have >> > gotten caught if runq_add() asserted that it didn't get passed an >> > already-queued process. >> Is RFSTOPPED in RFKERNELONLY then? I thought only RFHIGHPID was in >> RFKERNELONLY. > > des@des ~% current RFKERNELONLY > src/sys/kern/kern_fork.c: error = fork1(p, uap->flags & ~RFKERNELONLY, > &p2); > src/sys/sys/unistd.h: #define RFKERNELONLY RFSTOPPED > >> *sigh* Well, looks like I need to hack up rfork somehow, >> because this commit is correct, but the linux compatibility layer needs a >> way >> to bypass the userland checks that rfork provides. Possibly a rfork1(). > > Why? Rfork() does nothing else than userland checks. If you don't want > the userland checks, just call fork1() directly. It has the additional > advantage of returning a pointer to the new process' struct proc > instead of just its pid. Did you read rfork()? In my next e-mail, yes. It seems we both made the mistake of replying to e-mails while others were still in our inboxes. :) -- John Baldwin -- 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 majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message