From owner-freebsd-current Tue Jun 10 11:45:52 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id LAA23385 for current-outgoing; Tue, 10 Jun 1997 11:45:52 -0700 (PDT) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id LAA23329; Tue, 10 Jun 1997 11:45:18 -0700 (PDT) Received: (from root@localhost) by dyson.iquest.net (8.8.5/8.8.5) id NAA00476; Tue, 10 Jun 1997 13:43:53 -0500 (EST) From: "John S. Dyson" Message-Id: <199706101843.NAA00476@dyson.iquest.net> Subject: Re: rfork() man page wrong? In-Reply-To: <3395AF81.4487EB71@whistle.com> from Julian Elischer at "Jun 4, 97 11:10:09 am" To: julian@whistle.com (Julian Elischer) Date: Tue, 10 Jun 1997 13:43:53 -0500 (EST) Cc: current@freebsd.org, dyson@freebsd.org Reply-To: dyson@freebsd.org X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I've checked the man page and the sources.. > > it appears to me that the following section of the man page > is wrong.. > john, if you are reading, can you check if this is what > you understand? > I am reading now (sorry for the delay :-)). > > ------- > RFMEM If set, the kernel will force sharing of the entire ad- > dress space. The child will then inherit all the shared > segments the parent process owns. Other segment types > will be unaffected. Subsequent forks by the parent will > then propagate the shared data and bss between children. > The stack segment is always split. May be set only with > RFPROC. > -------- > The docs for RFMEM are wrong. The kernel will cause total address space sharing, which makes the threads fairly light weight. I am about to make some changes for SMP/kernel based threads to allow for per-cpu data though (but that is in kernel mode only where you see the difference.) You have to manage the stack issues, and I have some example and working code if you want it. (I am using it, and have delivered it for others to use.) I plan to refine the code before committing it, but I'll give you (or anyone) the code if anyone wants it. John