From owner-freebsd-hackers Thu Aug 23 12: 3:11 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id E92A237B407 for ; Thu, 23 Aug 2001 12:02:58 -0700 (PDT) (envelope-from julian@elischer.org) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id MAA54255; Thu, 23 Aug 2001 12:08:02 -0700 (PDT) Date: Thu, 23 Aug 2001 12:08:01 -0700 (PDT) From: Julian Elischer To: Bernd Walter Cc: Matt Dillon , Alfred Perlstein , freebsd-hackers@FreeBSD.ORG Subject: Re: mmap MAP_INHERIT question. In-Reply-To: <20010823203640.B27427@cicely20.cicely.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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