[comp.sys.hp] Read access to ndbm files query

paola@zen.co.uk (Paola Kathuria) (09/28/89)

Are there any problems if one user tries to read an ndbm database 
whilst another has opened it for reading and writing or vice versa?  

Background:   Using HP9000 Series 800 with HP-UX 3.01.

To make sure that games can't be played by certain users or at certain
terminals (like the front desk) users have to go through a program,
`play', which reads a file to check restrictions.

I have just written a program which makes maintaining the ndbm database
easier and I should like to know if there would be any problems if one
user tries to open the database for reading whilst another has already
opened it for reading and writing or the other way round.  The manual
doesn't say anything about database locking although I do use a
semaphore to lock the database to prevent more than one person updating
it at the same time.

Thanks in advance.

Paola

--
Paola Kathuria, Software Engineer, [paola@zen.co.uk<->uunet!zen.co.uk!paola]
Zengrange Limited, Greenfield Rd., Leeds, ENGLAND, LS9 8DB. (+44) 532 489048