From owner-cvs-all Mon Mar 12 14: 1: 9 2001 Delivered-To: cvs-all@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 5173337B718; Mon, 12 Mar 2001 14:00:57 -0800 (PST) (envelope-from des@ofug.org) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id XAA43403; Mon, 12 Mar 2001 23:00:55 +0100 (CET) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: John Baldwin Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/linux linux_machdep.c References: From: Dag-Erling Smorgrav Date: 12 Mar 2001 23:00:55 +0100 In-Reply-To: John Baldwin's message of "Sun, 11 Mar 2001 15:28:13 -0800 (PST)" Message-ID: Lines: 25 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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()? DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message