From owner-cvs-all Sun Mar 11 10:56: 7 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 EF10C37B71A; Sun, 11 Mar 2001 10:55:55 -0800 (PST) (envelope-from des@ofug.org) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id TAA36603; Sun, 11 Mar 2001 19:55: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: cvs-committers@FreeBSD.org Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/linux linux_machdep.c References: <200103111852.f2BIqBw46583@freefall.freebsd.org> From: Dag-Erling Smorgrav Date: 11 Mar 2001 19:55:54 +0100 In-Reply-To: Dag-Erling Smorgrav's message of "Sun, 11 Mar 2001 10:52:11 -0800 (PST)" Message-ID: Lines: 15 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --=-=-= Dag-Erling Smorgrav writes: > Log: > rfork() masks RFSTOPPED out of the flags it passes to fork1(), so we have > to call fork1() directly if we don't want out process queued right away. > This has the serendipitous side effect of saving us a call to pfind(). Attached is an equivalent patch for the Alpha; I'll leave it to someone who actually has one to commit it. DES -- Dag-Erling Smorgrav - des@ofug.org --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=linux-alpha.diff Index: linux_machdep.c =================================================================== RCS file: /home/ncvs/src/sys/alpha/linux/linux_machdep.c,v retrieving revision 1.11 diff -u -r1.11 linux_machdep.c --- linux_machdep.c 2001/03/06 02:55:23 1.11 +++ linux_machdep.c 2001/03/11 18:42:19 @@ -122,7 +122,6 @@ struct proc *p2; int exit_signal; vm_offset_t start; - struct rfork_args rf_args; #ifdef DEBUG if (ldebug(clone)) { @@ -156,14 +155,9 @@ error = 0; start = 0; - rf_args.flags = ff; - if ((error = rfork(p, &rf_args)) != 0) + if ((error = fork1(p, ff, &p2)) != 0) return (error); - p2 = pfind(p->p_retval[0]); - if (p2 == NULL) - return (ESRCH); - PROC_LOCK(p); p2->p_sigparent = exit_signal; PROC_UNLOCK(p); @@ -183,6 +177,8 @@ setrunqueue(p2); mtx_unlock_spin(&sched_lock); + p->p_retval[0] = p2->p_pid; + p->p_retval[1] = 0; return (0); } --=-=-=-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message