From owner-freebsd-hackers Thu Aug 23 4:16:28 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 9E20037B407 for ; Thu, 23 Aug 2001 04:16:25 -0700 (PDT) (envelope-from ticso@mail.cicely.de) Received: from mail.cicely.de (cicely20 [10.1.1.22]) by srv1.cosmo-project.de (8.11.0/8.11.0) with ESMTP id f7NBGMA33868 for ; Thu, 23 Aug 2001 13:16:23 +0200 (CEST) Received: (from ticso@localhost) by mail.cicely.de (8.11.0/8.11.0) id f7NBGQS26149 for freebsd-hackers@freebsd.org; Thu, 23 Aug 2001 13:16:26 +0200 (CEST) Date: Thu, 23 Aug 2001 13:16:25 +0200 From: Bernd Walter To: freebsd-hackers@freebsd.org Subject: mmap MAP_INHERIT question. Message-ID: <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 X-Operating-System: NetBSD cicely20.cicely.de 1.5 sparc 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 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. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message