The NDBM Database
Before you design your application program around a NDBM database, you need to answer the following questions:
Will readers and writer(s) need access at the same time?
How many writers will there be at one time?
Having multiple readers is not a problem when there is no write activity occurring. However, the NDBM routines do not provide any protection against readers and writers in conflict. For example, one process might delete a key that conflicts with another process that is visiting all the keys in the database. Additionally, these routines do not permit multiple writers to the database at one time. Despite these limitations, the NDBM routines still find many uses in standalone and single-user solutions.
Error Handling
With ...
Get Advanced UNIX Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.