summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2020-06-30 13:37:20 +0000
committerAlexander Færøy <ahf@torproject.org>2020-06-30 13:37:20 +0000
commit91d792388d7ad2dd67b8bf9e346a6c1a1d92a720 (patch)
treea775770562f5167b34207b235717ce75d36855fa
parentb31086201178c954e4d300273bbc7c7f5d4d6a8a (diff)
parentbebdd2888fd43510ff7786c6c8f52cd8a5565742 (diff)
downloadtor-91d792388d7ad2dd67b8bf9e346a6c1a1d92a720.tar.gz
tor-91d792388d7ad2dd67b8bf9e346a6c1a1d92a720.zip
Merge branch 'maint-0.3.5' into release-0.3.5
-rw-r--r--changes/bug328845
-rw-r--r--src/lib/thread/compat_pthreads.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/changes/bug32884 b/changes/bug32884
new file mode 100644
index 0000000000..9ab1d24464
--- /dev/null
+++ b/changes/bug32884
@@ -0,0 +1,5 @@
+ 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.
diff --git a/src/lib/thread/compat_pthreads.c b/src/lib/thread/compat_pthreads.c
index 05efe9cfd0..6f7ecd17da 100644
--- a/src/lib/thread/compat_pthreads.c
+++ b/src/lib/thread/compat_pthreads.c
@@ -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();
}