Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Tue, 4 Feb 2003 18:48:04 +0100 From: Corinna Vinschen To: Cygwin Subject: Re: mmap() issue affects cygipc (and PostgreSQL's PL/Tcl) Message-ID: <20030204174804.GI5822@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: Cygwin References: <20030204165929 DOT GA1400 AT tishler DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030204165929.GA1400@tishler.net> User-Agent: Mutt/1.4i 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 -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/