From owner-freebsd-hackers Wed Jan 12 9:47:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bomber.avantgo.com (ws1.avantgo.com [207.214.200.194]) by hub.freebsd.org (Postfix) with ESMTP id 045ED15506 for ; Wed, 12 Jan 2000 09:47:17 -0800 (PST) (envelope-from scott@avantgo.com) Received: from river ([10.0.128.30]) by bomber.avantgo.com (Netscape Messaging Server 3.5) with SMTP id 294; Wed, 12 Jan 2000 09:42:56 -0800 Message-ID: <24d101bf5d24$f54cf350$1e80000a@avantgo.com> From: "Scott Hess" To: "Ronald G. Minnich" , References: Subject: Re: rfork() [was: Concept check] Date: Wed, 12 Jan 2000 09:46:30 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ronald G. Minnich wrote: > On Wed, 12 Jan 2000, Alexander Litvin wrote: > > Matthew Dillon wrote: > > > :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?). > > OK, I'd like to propose another option to rfork to make it a little more > usable for mortals. The option is RFSTACK. This will cause rfork to work > like my original version, in that the stack segment (all memory from > USERSTACK and up) will be cloned. > > This would really make a big improvement in rfork usability. > > Comments? That sounds like an _excellent_ suggestion, for general usage. OTOH, it probably wouldn't be useful for building threading libraries, threads couldn't see each other's stacks. A libc version of clone() would probably be more useful, or perhaps an rfork() option which caused it to create a new stack segment which both processes would see (not much different from clone in that case). Later, scott To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message