Re: replacing dbm_* with dba_*
| From: | Rasmus Lerdorf | Date: | Sun, 20 Jun 1999 15:58:49 +0000 |
| Subject: | Re: replacing dbm_* with dba_* | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-7229@lists.php.net to get a copy of this message | ||
> Yes, that's right. But while it's true that it does not do that
> currently, I don't feel like kicking out db.c completely. It does
> other weired things such as the .lck thing which dba doesn't.
True, that .lck thing is a bit of a hack. I added this because I needed
to protect myself from two php scripts concurrently writing to a dbm file
and there is no inherent protection against that in the dbm
implementations. Now that we have user-level file locking, this feature
could probably be deprecated, but we would need to warn people in big bold
effervescent letters about this change and tell people to flock() the dbm
file(s) themselves. It's a bit tricky though since some dbm
implementations use two files and others just one. You would have to
figure out which variety you are using and lock the appropriate files.
Perhaps a dba_lock() user-level function would be appropriate to hide
this bit of weirdness from people.
> So, the big question is - shall dba become the official successor
> of dbm? If so, their behaviour should be as equal as possible.
Perhaps we can deprecate the dbm functions in PHP4. Maintaining two sets
of similar functions is a PITA.
-Rasmus