Commit 4f6901d7 authored by Nick Mathewson's avatar Nick Mathewson 🏃
Browse files

When initializing pthreads, always set the main thread.

Fixes bug 32884.  This is a bugfix on 0.3.3.1-alpha, when we started
allowing restart-in-process with tor_api.h.
parent 0b376361
o Minor bugfixes (embedded Tor):
- When starting Tor any time after the first time in a process, register
the thread in which it is running as the main thread. Previously, we
only did this on Windows, which could lead to bugs like 23081 on
non-Windows platforms. Fixes bug 32884; bugfix on 0.3.3.1-alpha.
......@@ -265,6 +265,6 @@ tor_threads_init(void)
pthread_attr_setdetachstate(&attr_detached, PTHREAD_CREATE_DETACHED);
tor_assert(ret2 == 0);
threads_initialized = 1;
set_main_thread();
}
set_main_thread();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment