On Mar 26, 2007, at 10:31 PM, David K. Hess wrote: > However, if durus *did* happen to be running, will I run into a new > race condition between the previous durus giving up the lock on the > database file before the new one tries to lock it? I think there will always be the remote possibility of a race, even if we check that locks are available. The critical thing is that only one writer wins the race. > Pondering how to handle that makes me start to think that maybe > is_durus_running might be best off trying to get a lock on the > database file. I think that is interesting, but it just moves a potential race to a different place, since the lock must be released before the real durus server starts. We do have a similar is_web_running() function that does not have a lock to examine.