This is the mail archive of the
mailing list for the Cygwin project.
Re: mmap() issue affects cygipc (and PostgreSQL's PL/Tcl)
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: Cygwin <cygwin at cygwin dot com>
- Date: Tue, 4 Feb 2003 18:48:04 +0100
- Subject: Re: mmap() issue affects cygipc (and PostgreSQL's PL/Tcl)
- References: <20030204165929.GA1400@tishler.net>
- Reply-to: cygwin at cygwin dot com
On Tue, Feb 04, 2003 at 11:59:30AM -0500, Jason Tishler wrote:
> $ fgrep 1224 /usr/include/w32api/winerror.h
> #define ERROR_USER_MAPPED_FILE 1224L
> The root cause of the problem is opening the file with the "O_TRUNC"
> flag -- without it, the open (in open2) succeeds. Unfortunately, cygipc
> seems to need open with truncation semantics for proper operation.
I'm surprised that this is meant to work at all. However, did you
check to omit the O_CREAT? The combination of O_CREATE and O_TRUNC
will result in a CreateFile() call using the CREATE_ALWAYS flag while
the O_TRUNC alone just uses the TRUNCATE_EXISTING flag. I could
easiliy imagine that Win32 doesn't like to remove and recreate a
file which is mmapped currently...
In theory a change to Cygwin should be possible then to avoid calling
CreateFile(CREATE_ALWAYS) if the file exists.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:email@example.com
Red Hat, Inc.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html