delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Date: | Thu, 10 Aug 2006 10:46:35 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: unlock fails if file not locked |
Message-ID: | <20060810084635.GI20467@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <ee2a432c0608100041q3d5aa42ajbdd81eb4f08801a7 AT mail DOT gmail DOT com> |
Mime-Version: | 1.0 |
In-Reply-To: | <ee2a432c0608100041q3d5aa42ajbdd81eb4f08801a7@mail.gmail.com> |
User-Agent: | Mutt/1.4.2i |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On Aug 10 00:41, Neal Norwitz wrote: > This test was taken from the python test suite. It works on many > different platforms and architecture's except cygwin's. I'm not > entirely sure that cygwin is really wrong either though. Thanks for the testcase! Cygwin is wrong here. The underlying Windows function returns an error code ERROR_NOT_LOCKED when trying to unlock a non-locked region. This should have been converted into a successful return from fcntl. I fixed that in CVS. Note, however, that file locking is not implemented quite correctly on Cygwin anyway. File locking on POSIX systems using fcntl is usually advisory (except in certain cases which require changes in the system settings). The Windows functions implement only mandatory locking and there's no advisory locking mechanism provided. Cygwin shouldn't actually use the underlying Windows functions but implement advisory file locking by keeping its own datastructures. But that's easier said than done. It's one point on a long TODO list... Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |