[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#8844) LMDB mdb_env_close is unsafe in forked child



Full_Name: Howard Chu
Version: 2.4
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (83.136.45.253)
Submitted by: hyc


Following on from ITS#8505.
mdb_env_close0() uses env->me_pid when clearing the readers table. If the env
was open in a process that forked, and the child process calls mdb_env_close(),
it will be clearing the wrong PID. Change this to use getpid() instead.