ITS#8505 Protect parent from fork()-pthread_exit()

This commit is contained in:
Hallvard Furuseth 2016-09-27 07:03:40 +02:00
parent 04acac634a
commit 6355dade31

View file

@ -4747,7 +4747,11 @@ mdb_env_reader_dest(void *ptr)
{
MDB_reader *reader = ptr;
reader->mr_pid = 0;
#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;
}
#ifdef _WIN32