dbm_error() — Check database error indicator

Standards

Standards / Extensions C or C++ Dependencies

XPG4.2
Single UNIX Specification, Version 3

both  

Format

#define _XOPEN_SOURCE_EXTENDED 1
#include <ndbm.h>

int dbm_error(DBM *db);

General description

The dbm_error() function returns the error condition of the database. The argument db is a handle to a database previously obtained by dbm_open().

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, the database error indicator may be set as a result of a database operation by another thread.

Returned value

dbm_error() returns 0 if the error condition is not set.

dbm_error() returns nonzero if the error condition is set.

Related information