From owner-freebsd-current Sat Mar 20 21:31:22 1999 Delivered-To: freebsd-current@freebsd.org Received: from zone.syracuse.net (zone.syracuse.net [209.2.141.6]) by hub.freebsd.org (Postfix) with ESMTP id 7C08F15082; Sat, 20 Mar 1999 21:31:20 -0800 (PST) (envelope-from green@unixhelp.org) Received: from localhost (green@localhost) by zone.syracuse.net (8.9.2/8.9.2) with ESMTP id FAA97744; Sun, 21 Mar 1999 05:29:35 GMT (envelope-from green@unixhelp.org) Date: Sun, 21 Mar 1999 05:29:35 +0000 (GMT) From: Brian Feldman X-Sender: green@zone.syracuse.net To: Alfred Perlstein Cc: "John S. Dyson" , samit@usa.ltindia.com, commiters@FreeBSD.ORG, freebsd-current@FreeBSD.ORG Subject: Re: rfork() In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 21 Mar 1999, Alfred Perlstein wrote: > On Sat, 20 Mar 1999, John S. Dyson wrote: > > > Michael E. Mercer said: > > > Hello, > > > > > > This was posted to freebsd-questions with no reply. > > > I tried this and the child process created a core file. > > > I also tried the other options and they seem to work. > > > Just RFPROC and RFMEM DON'T! > > > > > rfork(RFMEM) doesn't easily work from C. You need to > > create an assembly stub. > > > > -- > > John | Never try to teach a pig to sing, > > dyson@iquest.net | it makes one look stupid > > jdyson@nc.com | and it irritates the pig. > > > > I've seen about 6 people ask about this because the manual lies about > what is done. I asked a while back about it, and John was kind enough > to dig up some code that used rfork to properly split the stack should > I try to dig it up? > > In the meantime, can someone commit this or suggest something? For the suggest something, you realize that with Richard's VM_STACK code it should be relatively trivial to make this automatic (suggestion: add RFSTACK flag). > > thanks, > -Alfred > > Index: rfork.2 > =================================================================== > RCS file: /home/ncvs/src/lib/libc/sys/rfork.2,v > retrieving revision 1.8 > diff -u -r1.8 rfork.2 > --- rfork.2 1999/01/26 02:38:09 1.8 > +++ rfork.2 1999/03/21 04:49:10 > @@ -54,7 +54,8 @@ > 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 > +is not split and must be allocated manually via an assembler subroutine. > +May be set only with > .Dv RFPROC . > .It RFSIGSHARE > If set, the kernel will force sharing the sigacts structure between the > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > Brian Feldman _ __ ___ ___ ___ green@unixhelp.org _ __ ___ | _ ) __| \ http://www.freebsd.org/ _ __ ___ ____ | _ \__ \ |) | FreeBSD: The Power to Serve! _ __ ___ ____ _____ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message