From owner-freebsd-hackers Thu Aug 23 6:37:19 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id 75F5B37B43F for ; Thu, 23 Aug 2001 06:37:11 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 5EBFC81D06; Thu, 23 Aug 2001 08:37:11 -0500 (CDT) Date: Thu, 23 Aug 2001 08:37:11 -0500 From: Alfred Perlstein To: Bernd Walter Cc: freebsd-hackers@freebsd.org Subject: Re: mmap MAP_INHERIT question. Message-ID: <20010823083711.Z81307@elvis.mu.org> References: <20010823131625.A26135@cicely20.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010823131625.A26135@cicely20.cicely.de>; from ticso@mail.cicely.de on Thu, Aug 23, 2001 at 01:16:25PM +0200 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 * 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