June 2001
Intermediate to advanced
688 pages
19h 18m
English
#include <db.h> int DB→set_paniccall(DB *db, void (*paniccall)(DB_ENV *, int errval));
Errors can occur in the Berkeley DB library where the only solution is to shut down the application and run recovery. (For example, if Berkeley DB is unable to write log records to disk because there is insufficient disk space.) In these cases, the value DB_RUNRECOVERY is returned by Berkeley DB.
In these cases, it is also often simpler to shut down the application when such errors occur rather than to try to gracefully return up the stack. The DB→set_paniccall function is used to specify a function to be called when DB_RUNRECOVERY is about to be returned from a Berkeley DB method. When called, the dbenv argument will be a reference ...