This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Problem with fcnlt F_GETLK command
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 18 Nov 2009 21:11:05 +0100
- Subject: Re: Problem with fcnlt F_GETLK command
- References: <936047.37094.qm@web87013.mail.ird.yahoo.com>
- Reply-to: cygwin at cygwin dot com
On Nov 18 08:08, jmsplat101-cygwin@yahoo.co.uk 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
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple