Function lmdb_master_sys::mdb_env_get_fd

source ·
pub unsafe extern "C" fn mdb_env_get_fd(
    env: *mut MDB_env,
    fd: *mut mdb_filehandle_t,
) -> c_int
Expand description

Return the filedescriptor for the given environment.

This function may be called after fork(), so the descriptor can be closed before exec*(). Other LMDB file descriptors have FD_CLOEXEC. (Until LMDB 0.9.18, only the lockfile had that.)

§Arguments

  • env (direction in) - An environment handle returned by #mdb_env_create()
  • fd (direction out) - Address of a mdb_filehandle_t to contain the descriptor.

§Returns

A non-zero error value on failure and 0 on success. Some possible errors are:

  • EINVAL - an invalid parameter was specified.