From owner-freebsd-questions Thu Oct 14 15:43:30 1999 Delivered-To: freebsd-questions@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id CD3D715251 for ; Thu, 14 Oct 1999 15:43:24 -0700 (PDT) (envelope-from bright@wintelcom.net) Received: from localhost (bright@localhost) by fw.wintelcom.net (8.9.3/8.9.3) with ESMTP id QAA08252; Thu, 14 Oct 1999 16:03:37 -0700 (PDT) Date: Thu, 14 Oct 1999 16:03:37 -0700 (PDT) From: Alfred Perlstein To: bschwart@bbn.com Cc: freebsd-questions@FreeBSD.ORG Subject: Re: mmap and MAP_INHERIT In-Reply-To: <38060073.4FD0443B@echo.bbn.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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