mcDBsaveFile, mcDBsaveFileNoSync — Save current database
#include <memcom.h> int mcDBsaveFile(int handle); int mcDBsaveFileNoSync(int handle);
mcDBsaveFile
saves the context of the
current file handle
to disk, performing a close
operation followed by re-open. If completed successfully, the
function returns 0. Otherwise, a negative value indicating the
MemCom error number is returned.
mcDBsaveFileNoSync
performs the same operations
but does not invoke the kernel's fsync(2)
call
for flushing (or synchronizing) file data to disk. Depending on the
type of file system and the file system settings, omitting
fsync(2)
improves performance, but database
integrity might be impaired if the machine crashes 1-2 minutes after
mcDBsaveFileNoSync
has been called.