mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 22:47:16 +08:00
mdbx: быстрый выход для не-активной среды.
This commit is contained in:
parent
179d8d6d6b
commit
183d1e1a44
@ -15913,6 +15913,9 @@ __cold int mdbx_env_resurrect_after_fork(MDBX_env *env) {
|
|||||||
if (unlikely(env->me_flags & MDBX_FATAL_ERROR))
|
if (unlikely(env->me_flags & MDBX_FATAL_ERROR))
|
||||||
return MDBX_PANIC;
|
return MDBX_PANIC;
|
||||||
|
|
||||||
|
if (unlikely((env->me_flags & MDBX_ENV_ACTIVE) == 0))
|
||||||
|
return MDBX_SUCCESS;
|
||||||
|
|
||||||
const uint32_t new_pid = osal_getpid();
|
const uint32_t new_pid = osal_getpid();
|
||||||
if (unlikely(env->me_pid == new_pid))
|
if (unlikely(env->me_pid == new_pid))
|
||||||
return MDBX_SUCCESS;
|
return MDBX_SUCCESS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user