From owner-freebsd-hackers Tue Jan 11 21:57: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 8B46015500 for ; Tue, 11 Jan 2000 21:57:05 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id VAA67332; Tue, 11 Jan 2000 21:56:58 -0800 (PST) (envelope-from dillon) Date: Tue, 11 Jan 2000 21:56:58 -0800 (PST) From: Matthew Dillon Message-Id: <200001120556.VAA67332@apollo.backplane.com> To: Alexander Litvin Cc: "Scott Hess" , hackers@FreeBSD.ORG Subject: Re: rfork() [was: Concept check] References: <200001120534.AAA10170@unknown.nowhere.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :> fork1() in the kernel]. rfork(RFMEM) means that the processes share all :> memory - current AND FUTURE. You could use minherit() before fork() to :> share current memory, but not future memory. : :BTW, concerning rfork(RFMEM). Could somebody explain me, why the :following simple program is coredumping: You cannot call rfork() with RFMEM directly from a C program. You have to use assembly (has anyone created a native clone() call yet to do all the hard work?). The reason is that rfork(RFMEM) does not give the new process a new stack, so both the old and new processes wind up on the same original stack and stomp all over each other. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message