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

mdb.RE/0.9
Hallvard Furuseth 8 years ago
parent eb1a307e4a
commit 6e81d4071b
  1. 6
      libraries/liblmdb/mdb.c

@ -4429,7 +4429,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

Loading…
Cancel
Save