*I$Berkeley DB: DB->sync[P

DB->sync





#include <db.h>

int"DB->sync(DB *db, u_int32_t flags);





Description



=The DB->sync function flushes any cached information to disk.

JIf the database is in memory only, the DB->sync function has no effect andwill always succeed.

EThe flags parameter is currently unused, and must be set to 0.

fSee DB->close for a discussion of Berkeley DB and cached data.

The DB->syncHfunction returns the value of errno on failure, and 0 on success.



Errors

QIf a fatal error occurs in Berkeley DB, the DB->sync function may fail and returnFDB_RUNRECOVERY, at which point all subsequent database calls will alsoreturn DB_RUNRECOVERY.

The DB->sync)function may fail and return errnoKfor any of the errors specified for the following Berkeley DB and C library functions:4DB->cursor,.DB->get, DB->sync,DBcursor->c_close(3),__account_page(3), close(3),dbenv->db_paniccall(3), fcntl(3), fflush(3), fprintf(3),free(3),func(3),6lock_get,3lock_put,6lock_vec,1log_put, malloc(3), memcpy(3), memmove(3),9memp_fget,9memp_fput,9memp_fset,;memp_fsync, memset(3), munmap(3),open(3), realloc(3),sigfillset(3),sigprocmask(3), strerror(3), unlink(3), vfprintf(3), vsnprintf(3),and write(3).

In addition, the DB->sync)function may fail and return errnofor the following conditions:

B

EINVAL
An invalid flag value or parameter was specified.







See Also

8db_appexit,8db_appinit,8db_version,2DB->close,4DB->cursor,.DB->del,,DB->fd,.DB->get,0DB->join,/db_open,.DB->put,0DB->stat, DB->sync,;DBcursor->c_close,7DBcursor->c_del,6DBcursor->c_getand7DBcursor->c_put.
ÿÿ