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
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php