Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-01-31 20:00:42 +0300
committerChristopher Faylor <me@cgf.cx>2003-01-31 20:00:42 +0300
commit949c3da11ad67ad4ad46ff4429bd85b4dae9eb8a (patch)
tree4488ca609816ec4df87f90cbcccec2ed7ecd40ba /winsup/cygwin/pwdgrp.h
parent485d85bfa72707af58c49e0359ec1eed2fb88de7 (diff)
* passwd.cc (pwdgrp::read_passwd): linebuf *must* be static (from Pierre
Humblet). * pwdgrp.h (pwdgrp::refresh): Avoid calling read function if we already have lock since that means we are in the process of reading the file.
Diffstat (limited to 'winsup/cygwin/pwdgrp.h')
-rw-r--r--winsup/cygwin/pwdgrp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/pwdgrp.h b/winsup/cygwin/pwdgrp.h
index 73d41a097..51b489f7e 100644
--- a/winsup/cygwin/pwdgrp.h
+++ b/winsup/cygwin/pwdgrp.h
@@ -71,9 +71,9 @@ public:
{
if (!check && initialized)
return;
- pglock->acquire ();
- if (!initialized || (check && etc::file_changed (etc_ix)))
- (this->*read) ();
+ if (pglock->acquire () == 1 &&
+ (!initialized || (check && etc::file_changed (etc_ix))))
+ (this->*read) ();
pglock->release ();
}