X-Spam-Check-By: sourceware.org Message-ID: Date: Thu, 10 Aug 2006 00:41:25 -0700 From: "Neal Norwitz" To: cygwin AT cygwin DOT com, "Jason Tishler" Subject: unlock fails if file not locked MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_106940_8529036.1155195685608" 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 Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com ------=_Part_106940_8529036.1155195685608 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. The attached c program should print only a single message: lock failed in parent (expected) 13 However it also prints: unlock failed in parent (not expected) 13 -bash-3.1$ uname -a CYGWIN_NT-5.1 stella 1.7.0s(0.159/4/2) 20060802 23:48:39 i686 Cygwin Also happens with 1.5.19 and 20 I'm pretty sure. Please copy me on any follow up. n ------=_Part_106940_8529036.1155195685608 Content-Type: text/plain; name=conflict.c; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_eqotmlxx Content-Disposition: attachment; filename="conflict.c" CiNpbmNsdWRlIDxzdGRpby5oPgojaW5jbHVkZSA8dW5pc3RkLmg+CiNpbmNs dWRlIDxlcnJuby5oPgojaW5jbHVkZSA8ZmNudGwuaD4KCnN0YXRpYyB2b2lk IGxvY2soaW50IGZkLCBjb25zdCBjaGFyICp3aGVyZSwgY29uc3QgY2hhciAq ZXhwZWN0ZWQpCnsKICAgIHN0cnVjdCBmbG9jayBsZiA9IHsgLmxfdHlwZSA9 IEZfV1JMQ0ssIDAgfTsKICAgIGludCBlcnIgPSBmY250bChmZCwgRl9TRVRM SywgJmxmKTsKICAgIGlmIChlcnIgPCAwKQoJZnByaW50ZihzdGRlcnIsICJs b2NrIGZhaWxlZCBp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4gMDsKfQoK ------=_Part_106940_8529036.1155195685608 Content-Type: text/plain; charset=us-ascii -- 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/ ------=_Part_106940_8529036.1155195685608--