Date: 12 Mar 2001 23:00:55 +0100 From: Dag-Erling Smorgrav <des@ofug.org> To: John Baldwin <jhb@FreeBSD.org> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/linux linux_machdep.c Message-ID: <xzp3dciwstk.fsf@flood.ping.uio.no> In-Reply-To: John Baldwin's message of "Sun, 11 Mar 2001 15:28:13 -0800 (PST)" References: <XFMail.010311152813.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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()? 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzp3dciwstk.fsf>