Date: Mon, 12 Mar 2001 14:59:28 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Dag-Erling Smorgrav <des@ofug.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/linux linux_machdep.c Message-ID: <XFMail.010312145928.jhb@FreeBSD.org> In-Reply-To: <xzp3dciwstk.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12-Mar-01 Dag-Erling Smorgrav wrote: > John Baldwin <jhb@FreeBSD.org> 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 <jhb@FreeBSD.org> -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010312145928.jhb>