mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 15:49:34 -05:00
ITS#8505 Protect parent from fork()-pthread_exit()
This commit is contained in:
parent
eb1a307e4a
commit
6e81d4071b
1 changed files with 5 additions and 1 deletions
|
|
@ -4429,6 +4429,10 @@ mdb_env_reader_dest(void *ptr)
|
||||||
{
|
{
|
||||||
MDB_reader *reader = ptr;
|
MDB_reader *reader = ptr;
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
if (reader->mr_pid == getpid()) /* catch pthread_exit() in child process */
|
||||||
|
#endif
|
||||||
|
/* We omit the mutex, so do this atomically (i.e. skip mr_txnid) */
|
||||||
reader->mr_pid = 0;
|
reader->mr_pid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue