Read access to ndbm files query

Paola Kathuria paola at zen.co.uk
Fri Sep 29 02:13:36 AEST 1989


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 at zen.co.uk<->uunet!zen.co.uk!paola]
Zengrange Limited, Greenfield Rd., Leeds, ENGLAND, LS9 8DB. (+44) 532 489048



More information about the Comp.unix.questions mailing list