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 Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <3.0.5.32.20011208173040.0082f940@pop.ne.mediaone.net> X-Sender: phumblet AT pop DOT ne DOT mediaone DOT net (Unverified) X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Sat, 08 Dec 2001 17:30:40 -0500 To: cygwin AT cygwin DOT com From: "Pierre A. Humblet" Subject: Re: More exim, and fcntl lock problems In-Reply-To: <3.0.5.32.20011208165955.008351e0@pop.ne.mediaone.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" >"Pierre A. Humblet" wrote: > >2) On WinNT, local deliveries fail on line 765 of transport.c > while ((len = read(deliver_datafile, deliver_in_buffer, >I reproduced the situation in the attached try.c >A parent process opens and locks a file (using fcntl), >and then forks a child. It turns out that the child cannot >read the file. Is it a Cygwin bug (latest everything)? This answers my own question to close this matter. Cygwin's file locking is based on Windows LockFileEx(), which uses a mandatory locking method, rather than a cooperative one as in Unix. For a tutorial, see e.g. http://www.netapp.com/tech_library/3024.html Making Cygwin's locking more Unix-like would be a big task. If you run into this issue my advice is to modify the application. Pierre -- 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/