This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Fatal error using flock
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Corinna Vinschen <cygwin at cygwin dot com>, cygwin at cygwin dot com
- Date: Wed, 3 Dec 2014 10:27:41 +0300
- Subject: Re: Fatal error using flock
- Authentication-results: sourceware.org; auth=none
- References: <CAFSgOmZQ2WCABJa0gdN_7A2PhE+8CguqjA7ZQ8xXcDdc7OnDWw at mail dot gmail dot com> <20141202134803 dot GW3810 at calimero dot vinschen dot de> <20141202155213 dot GX3810 at calimero dot vinschen dot de>
- Reply-to: cygwin at cygwin dot com
Greetings, Corinna Vinschen!
> On Dec 2 14:48, Corinna Vinschen wrote:
>> On Dec 1 23:43, Kyle R. wrote:
>> > I've run into a problem with flock while doing some parallel scripting
>> > in bash (also seen in dash) on the latest 64-bit version of Cygwin
>> > running on Windows 8.1. In the attached simple test case, the code
>> > locks and unlocks a file in a loop. After the first iteration of the
>> > loop is completed, this error is thrown:
>> >
>> > 0 [main] flock 7008 C:\cygwin64\bin\flock.exe: *** fatal error -
>> > NtCreateEvent(lock): 0xC0000035
>> > ./test.sh: line 12: 7008 Hangup flock -x 5
>>
>> Confirmed. I'll investigate.
>>
>> > However, the problem doesn't occur if I comment out the "while true
>> > do" and "done" and call the script file from a while loop in another
>> > bash script.
>>
>> This sounds like a problem with the parent process holding the event
>> object connected to the lock. This doesn't happen in the second case,
>> because the parent holding the lock disappeared as well.
> Ouch. The handle in the parent got created non-inheritable. That's
> bad if the handle is utilized in subsequent child processes which rely
> on being able to access the handle.
> I applied a patch and created a new developer snapshot on
> https://cygwin.com/snapshots/
> Please give it a try.
Works here with original STC.
--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 03.12.2014, <10:27>
Sorry for my terrible english...
--
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