# DBENV->set_recovery_init |

`

###

    #include <db.h>

    int
    DBENV->set_recovery_init(DB_ENV *,
        int (*db_recovery_init_fcn)(DB_ENV *));

# Description

Applications installing application-specific recovery functions need to be called before Berkeley DB performs recovery so they may add their recovery functions to Berkeley DB's.

The DBENV->set_recovery_init function supports this functionality. The db_recovery_init_fcn function must be declared with one argument, a reference to the enclosing Berkeley DB environment. This function will be called after the DBENV->open has been called, but before recovery is started.

If the db_recovery_init_fcn function returns a non-zero value, no recovery will be performed and DBENV->open will return the same value to its caller.

The DBENV->set_recovery_init interface may only be used to configure Berkeley DB before the DBENV->open interface is called.

The DBENV->set_recovery_init function returns a non-zero error value on failure and 0 on success.

# Errors

EINVAL
  An invalid flag value or parameter was specified.

  Called after DBENV->open was called.

# See Also

DBENV->close, db_env_create, DBENV->open, DBENV->remove, DBENV->err, db_strerror, db_version, DBENV->set_cachesize, DBENV->set_errcall, DBENV->set_errfile, DBENV->set_errpfx, DBENV->set_flags, DBENV->set_mutexlocks, DBENV->set_paniccall, and DBENV->set_verbose.`

Copyright Sleepycat Software