Re: gdbm locking problem

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

 




No offense taken =) It 's often the small things that trip me up. In this case, though, the situation is so simple that I suspect a problem with gdbm, or maybe the way that I'm using gdbm.


1) are both scripts repeatedly printing their results, or does the
second not start until you stop the first? (gotta ask)

Both are repeatedly printing their results. =)

2) are the two test files in the same directory, or in some other
patentedly obvious way definitely opening the same database? (also had
to ask)


They are in the same directory, opening the same database.


3) is it possible that the dba_open call in the second script is
returned something not false -
to indicate the wait status?  The help says it returns false on fail,
and a database handle on success - but a wait is neither of those.
Realistically it shouldn't return until it hits one or the other, so
things are stranger still.


I suppose it's possible - but it really shouldn't be returning anything. It should block until the lock is released by the first script. (on exit)

I modified the scripts to use flock and it worked perfectly. It's only when I use the gdbm handler that this problem surfaces. I also tried using just the "wl" mode, with the same result. Is there any problem between the interaction of gdbm and php and FreeBSD? I am using php 4.3.8, and FreeBSD 4.10.1

Thanks!

Michael Jeung

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux