[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: lockfiles in pwdb



On Mon, 15 Jun 1998, Adrian Hosey wrote:

> #1 comes up again, removes the stale lock, links it's own scratch
> file, checks the link count (which is now 2) and decides everything is
> okay. It's somewhere in its critical section, doing critical things,
> when its time runs out again.
> 
> #2 comes up. It has already decided to remove the lockfile, so it
> does, even though the lock now belongs to #1. It links it's own
> scratch file, checks the link count (still 2) and decides everything
> is okay. Whoops, both processes are now in the critical section.

But then again #1 is up and checks the link count of the dummy lock file
and that will not be exactly 2 anymore.

There are a couple of scenarios that "shouldn't happen", though.

Cristian
--
----------------------------------------------------------------------
Cristian Gafton   --   gafton@redhat.com   --   Red Hat Software, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 UNIX is user friendly. It's just selective about who its friends are.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []