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

ntdll
Hallvard Furuseth 8 years ago
parent 04acac634a
commit 6355dade31
  1. 4
      libraries/liblmdb/mdb.c

@ -4747,6 +4747,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…
Cancel
Save