This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with fcnlt F_GETLK command

On Nov 18 08:08, wrote:
> Hello,
> I've down loaded version 1.7 onto my Windows XP laptop (uname -a
> reports CYGWIN_NT-5.1 XXXXXXXXXX 1.7.0(0.217/5/3) 2009-11-10 13:03
> i686 Cygwin) and I'm having some problems with the fcntl() function.
> I've written the following sample to demonstrate?the problem:
> [SNIP]
> If I run this code in the same directory in two seperate shells I'd
> expect only the first?instance?to print 'No blocking lock'?
> however?both do?and the? second then goes on to block waiting for the
> actual lock (which it gets when I terminate the first instance). So
> the locking functionality works just fine; however the lock reporting
> does seem not to work and always returns F_UNLCK.
> Can someone confirm if this is?a known limittaion of the current
> version, a limitation of the underlying windows API or a bug?

It's a bug.  The original BSD code which the Cygwin code is based on
took a shortcut in a specific case, which is invalid for Cygwin.
I disabled this shaortcut and your testcase runs fine now.  I'll
prepare a new 1.7.0 testrelease in the next few days.

Thanks for the report and espcially thanks for the simple testcase.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]