Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Mar 1996 19:28:53 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        dawes@rf900.physics.usyd.edu.au (David Dawes)
Cc:        toor@dyson.iquest.net, sos@FreeBSD.org, coredump@nervosa.com, mmead@Glock.COM, current@FreeBSD.org
Subject:   Re: -current and accelx
Message-ID:  <199603160228.TAA14695@phaeton.artisoft.com>
In-Reply-To: <199603160127.MAA14131@rf900.physics.usyd.edu.au> from "David Dawes" at Mar 16, 96 12:27:20 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> I'm don't have any ideas about AccelX, but after looking at the changes
> in vm_mmap.c, I tried adding MAP_SHARED to the mmap() flags in my test
> program, and that fixed it when using the 1.38 version of vm_mmap.c.
> I don't understand why the mapping needs to be shared to prevent a
> *parent* losing it after it has forked.  We certainly don't need (or want)
> the child to share the mapping.  I may be mis-understanding the intention
> of MAP_SHARED.

It shouldn't need to be present in that case.

The MAP_SHARED is supposed to mean that pages are not copy-on-write
faulted, nothing more.  Generally used for implementing IPC facilities.

This isn't well documented in the man page, but...

When the parent forks, and there is mapped memory, unless the MAP_INHERIT
flag is present, the child process should lose the mapping to the address
space, in all cases.

Are you sure that whatever it is isn't using "vfork"?  I don't know
if vfork handled this correctly at all.

In any case, you are not misinterpreting MAP_SHARED, IMO.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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