I have an ndbm database which could be accessed by more than one
process at a time. So, of course I want to do file locking.
So I have a few questions which should be vendor independent (I hope).
lockf wants a file descriptor for the first argument, not a pointer to
DBM.
So,
1) Should I open the .pag file RDWR, do a lock on it, and then in
the same process, do the dbm_open, dbm_store, dbm_close?
2) I would think I'll have to lock the entire file, as that fd isn't
going to know what offset in the file will point to where
I am about to write in the .pag file. Must I lock the entire
file?
As I said, this would seem to be vendor independent, but I'll mention
that I am running Solaris 2.3+patches on a Sparc 20.
Thanks in advance for any ideas/suggestions/comments.
-rob
---
Rob Francis
Paradigm Systems <URL:http://www.sf.psca.com/Hyplans/rfrancis/>