Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Aug 2001 12:08:01 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Bernd Walter <ticso@mail.cicely.de>
Cc:        Matt Dillon <dillon@earth.backplane.com>, Alfred Perlstein <bright@mu.org>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: mmap MAP_INHERIT question.
Message-ID:  <Pine.BSF.4.21.0108231206130.48732-100000@InterJet.elischer.org>
In-Reply-To: <20010823203640.B27427@cicely20.cicely.de>

next in thread | previous in thread | raw e-mail | index | archive | help


On Thu, 23 Aug 2001, Bernd Walter wrote:

> On Thu, Aug 23, 2001 at 10:38:31AM -0700, Matt Dillon wrote:
> >    MAP_INHERIT is broken and always has been.
> 
> That's a good argument.
> If it's true it awards an entry in the manpages BUGS section.
> Btw. I just tested on NetBSD 1.5U sparc with the same result -
>      but without the crashing.
> 
> Is there another way to get a shared memory region into another program
> without using SYSV SHM and without having a linked file?
> The problem is that I don't want a file lying around and need to
> be possible to exec at every time.

create teh file,
unlink it.
pass the file descriptor across a unix domain socket?

> 
> I thought about creating a file - unlinking it and dup2 the still open
> handle into second programm - then mmap the whole file.
> Will the memory be truely shared after that or do I need to msync(2)?
> Will it work if I use MAP_NOSYNC?
>

msync syncs to disk
you probably DON't want that..
it'll be shared if  you specify that..

 
> -- 
> B.Walter              COSMO-Project         http://www.cosmo-project.de
> ticso@cicely.de         Usergroup           info@cosmo-project.de
> 
> 


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?Pine.BSF.4.21.0108231206130.48732-100000>