dbm_clearerr() — Clear database error indicator
Standards
Standards / Extensions | C or C++ | Dependencies |
---|---|---|
XPG4.2 |
both |
Format
#define _XOPEN_SOURCE_EXTENDED 1
#include <ndbm.h>
int dbm_clearerr(DBM *db);
General description
The dbm_clearerr() function clears the error condition of the database. The argument db is a handle to a database previously obtained by dbm_open(). Note that this does not correct any problems with the database due to previous failures. It simply allows dbm_ operations to proceed. The database may be in an inconsistent or damaged state.
Special behavior for z/OS® UNIX Services: In a multithreaded environment, the database error indicator is global to all threads using the database handle. Thus, clearing the error indicator affects all threads using the database handle.
Returned value
The return value is unspecified by X/Open.
If successful, dbm_clearerr() returns 0.
If
unsuccessful, dbm_clearerr() returns -1 and sets errno to one of the
following values:
- Error Code
- Description
- EINVAL
- Non-valid database descriptor specified.
Related information
- ndbm.h
- dbm_close() — Close a database
- dbm_delete() — Delete database record
- dbm_error() — Check database error indicator
- dbm_fetch() — Get database content
- dbm_firstkey() — Get first key in database
- dbm_nextkey() — Get next key in database
- dbm_open() — Open a database
- dbm_store() — Store database record