From owner-freebsd-hackers Thu Aug 23 10: 3:22 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 EC8C237B405 for ; Thu, 23 Aug 2001 10:03:18 -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 KAA53679; Thu, 23 Aug 2001 10:13:02 -0700 (PDT) Date: Thu, 23 Aug 2001 10:13:01 -0700 (PDT) From: Julian Elischer To: Alfred Perlstein Cc: Bernd Walter , freebsd-hackers@freebsd.org Subject: Re: mmap MAP_INHERIT question. In-Reply-To: <20010823083711.Z81307@elvis.mu.org> 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 exec gives you an new vm space.. inherrit only applies to forks On Thu, 23 Aug 2001, Alfred Perlstein wrote: > * Bernd Walter [010823 06:16] wrote: > > I do the following: > > buf = (char*)mmap(NULL, BUFSIZE, PROT_READ | PROT_WRITE, > > MAP_ANON | MAP_INHERIT | MAP_SHARED, -1, 0); > > > > Now I vfork/execve a child. > > But the child can't access the mmaped memory. > > It was my understanding that MAP_INHERIT | MAP_SHARED keep the memory > > over the execve. > > Without sample code this is impossible to explain. > > -- > -Alfred Perlstein [alfred@freebsd.org] > Ok, who wrote this damn function called '??'? > And why do my programs keep crashing in it? > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message