gdbm locking problem

From: Date: Tue, 26 Oct 2004 18:31:01 +0000
Subject: gdbm locking problem
Groups: php.db 
Request: Send a blank email to php-db+get-37006@lists.php.net to get a copy of this message
Hello everyone, I am having trouble with gdbm locking. I've written two very simple test scripts that I am running simultaneously and locking does not seem to be working properly. 1st Test Script - Opens a writer lock, then spins infinitely. dba_open("research.db", "wd", "gdbm"); while(1) {
    echo "I have a writer lock on the file! \n";
} 2nd Test Script: - Spins infinitely, trying to get a write lock on the file. while(1) {
    if(dba_open("research.db", "wd", "gdbm"))
      echo "I also have a write lock on the file! (using dba_open) \n";
} Here is the problem: When I run Script 1 and then Script 2 (while Script 1 is running), both scripts claim to have a writer lock on research.db. This doesn't seem right. What am I missing? I'm running both of the scripts in the same directory on the same machine under FreeBSD 4.10. Thanks for your help! Michael Jeung

« previous php.db (#37006) next »