From owner-freebsd-hackers Thu Aug 23 10:39: 6 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 2866637B408 for ; Thu, 23 Aug 2001 10:39:04 -0700 (PDT) (envelope-from dillon@earth.backplane.com) Received: (from dillon@localhost) by earth.backplane.com (8.11.4/8.11.2) id f7NHcVo87785; Thu, 23 Aug 2001 10:38:31 -0700 (PDT) (envelope-from dillon) Date: Thu, 23 Aug 2001 10:38:31 -0700 (PDT) From: Matt Dillon Message-Id: <200108231738.f7NHcVo87785@earth.backplane.com> To: Julian Elischer Cc: Alfred Perlstein , Bernd Walter , freebsd-hackers@freebsd.org Subject: Re: mmap MAP_INHERIT question. References: 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 MAP_INHERIT is broken and always has been. -Matt :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 : To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message