This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: CreateFileMapping/MapViewOfFile and fork
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 6 Mar 2007 22:53:22 -0500
- Subject: Re: CreateFileMapping/MapViewOfFile and fork
- References: <5c8adab70703061906j7e074747g8d98171566bde9dd@mail.gmail.com>
- Reply-to: 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/