Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Jun 1997 21:01:14 +0100
From:      Brian Somers <brian@awfulhak.org>
To:        Bill Fenner <fenner@parc.xerox.com>
Cc:        cvs-etc@freebsd.org, cvs-all@freebsd.org, cvs-committers@freebsd.org
Subject:   Re: cvs commit: src/etc rc 
Message-ID:  <199706032001.VAA00608@awfulhak.demon.co.uk>
In-Reply-To: Your message of "Tue, 03 Jun 1997 08:32:05 PDT." <97Jun3.083213pdt.177489@crevenia.parc.xerox.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Don't forget that if you use a flock(), there is a race condition when
> two seperate processes are checking to see if the daemon is running
> where one process may think it's not running (its attempt to lock the
> pidfile succeeds) and the other process thinks it's running (since its
> attempt fails since the first process hadn't released its lock yet).

Not true.  The lock is a write lock.  The check is a read lock.  A
read lock won't affect another read lock.

Remember, you can do just about anything, given the ability to both
read lock and write lock.

>   Bill
> 

-- 
Brian <brian@awfulhak.org>, <brian@freebsd.org>
      <http://www.awfulhak.org>;
Don't _EVER_ lose your sense of humour....





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706032001.VAA00608>