* 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.
This commit is contained in:
Christopher Faylor
2003-01-31 17:00:42 +00:00
parent 485d85bfa7
commit 949c3da11a
3 changed files with 12 additions and 4 deletions

View File

@ -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 ();
}