Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2000 09:33:50 -0500 (EST)
From:      Alexander Litvin <archer@lucky.net>
To:        hackers@freebsd.org
Subject:   Re: rfork() [was: Concept check]
Message-ID:  <200001121433.JAA12686@unknown.nowhere.org>
In-Reply-To: <200001120556.VAA67332@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon <dillon@apollo.backplane.com> 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?).

>     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.

Oh, well, I suspected something like that (from what I saw, trying to
debug that small piece of code).

Should it be at least mentioned in rfork(2)?

--- 
You are only young once, but you can stay immature indefinitely.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001121433.JAA12686>