delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/03/06/22:53:41

X-Spam-Check-By: sourceware.org
Date: Tue, 6 Mar 2007 22:53:22 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: CreateFileMapping/MapViewOfFile and fork
Message-ID: <20070307035322.GA19636@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <5c8adab70703061906j7e074747g8d98171566bde9dd AT mail DOT gmail DOT com>
Mime-Version: 1.0
In-Reply-To: <5c8adab70703061906j7e074747g8d98171566bde9dd@mail.gmail.com>
User-Agent: Mutt/1.5.11
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Tue, Mar 06, 2007 at 10:06:33PM -0500, Sean Daley wrote:
>As part of an application we're developing, we use
>CreateFileMapping/MapViewOfFile to be able to share information among
>processes.  I noticed today that if I try to reference the map
>immediately after calling fork() but before calling exec, that my
>application will crash.
>
>I should be able to resolve this in my app but I was just curious if
>this was unexpected behavior or not.

No.  It is not unexpected.  Cygwin is intended to emulate linux.
CreateFileMapping is not a linux function.

If you want to use Windows functions for this type of thing you probably
shouldn't be using Cygwin.  Maybe you really want to use MinGW
(http://mingw.org).  Either that or you should be using linux/unix alike
functions like mmap().

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019