Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Oct 1999 16:03:37 -0700 (PDT)
From:      Alfred Perlstein <bright@wintelcom.net>
To:        bschwart@bbn.com
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: mmap and MAP_INHERIT
Message-ID:  <Pine.BSF.4.05.9910141602200.8080-100000@fw.wintelcom.net>
In-Reply-To: <38060073.4FD0443B@echo.bbn.com>

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

On Thu, 14 Oct 1999, Bev Schwartz wrote:

> The man page for mmap describes a parameter MAP_INHERIT as follows:
> 	Permit regions to be inherited across execve(2) system calls.
> 
> I would like a fork'ed and exec'ed child to be able to access mapped memory
> that the parent set up, but I have not yet figured out how to make this
> work.
> 
> Anyone have suggestions, or better, a piece of working code that does this?

You must use SYSV memory, or somehow communicate the name of the mmap'd
file to the exec'd process.  Note: this won't work with anonymous
mapped segments.

-Alfred



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" 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.05.9910141602200.8080-100000>