This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: More exim, and fcntl lock problems
- From: "Pierre A. Humblet" <Pierre dot Humblet at ieee dot org>
- To: cygwin at cygwin dot com
- Date: Sat, 08 Dec 2001 17:30:40 -0500
- Subject: Re: More exim, and fcntl lock problems
>"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/