* flock.cc (lf_setlock): Don't close waited lock object handle before
we own the node lock. Fix comment.
This commit is contained in:
parent
8895d962d5
commit
a8c8f19a43
@ -1,3 +1,8 @@
|
|||||||
|
2012-02-14 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* flock.cc (lf_setlock): Don't close waited lock object handle before
|
||||||
|
we own the node lock. Fix comment.
|
||||||
|
|
||||||
2012-02-14 Corinna Vinschen <corinna@vinschen.de>
|
2012-02-14 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* cygheap.cc (init_cygheap::init_installation_root): Convert function
|
* cygheap.cc (init_cygheap::init_installation_root): Convert function
|
||||||
|
@ -1039,11 +1039,11 @@ lf_setlock (lockf_t *lock, inode_t *node, lockf_t **clean, HANDLE fhdl)
|
|||||||
DWORD ret = WaitForMultipleObjects (wait_count, w4, FALSE,
|
DWORD ret = WaitForMultipleObjects (wait_count, w4, FALSE,
|
||||||
proc ? INFINITE : 100L);
|
proc ? INFINITE : 100L);
|
||||||
SetThreadPriority (GetCurrentThread (), old_prio);
|
SetThreadPriority (GetCurrentThread (), old_prio);
|
||||||
/* Always close handles before locking the node. */
|
|
||||||
NtClose (obj);
|
|
||||||
if (proc)
|
if (proc)
|
||||||
CloseHandle (proc);
|
CloseHandle (proc);
|
||||||
node->LOCK ();
|
node->LOCK ();
|
||||||
|
/* Never close lock object handle outside of node lock! */
|
||||||
|
NtClose (obj);
|
||||||
if (ret == WAIT_SIGNAL_ARRIVED)
|
if (ret == WAIT_SIGNAL_ARRIVED)
|
||||||
{
|
{
|
||||||
/* A signal came in. */
|
/* A signal came in. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user