summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-10-23 08:47:52 -0400
committerNick Mathewson <nickm@torproject.org>2017-10-23 08:47:52 -0400
commitfcaf3335b4916940a8033a3432bf2957c6927c0b (patch)
tree3bd9226edfdd9cf1545c72984c77a273b6feb835
parent68dea082e728094e393ee7629854e5e8ad9bbe32 (diff)
parent3e68db02c45ea06c3f20854df1f76894424d4357 (diff)
downloadtor-fcaf3335b4916940a8033a3432bf2957c6927c0b.tar.gz
tor-fcaf3335b4916940a8033a3432bf2957c6927c0b.zip
Merge remote-tracking branch 'public/bug23081_025' into maint-0.2.9
-rw-r--r--changes/bug230818
-rw-r--r--src/or/ntmain.c1
2 files changed, 9 insertions, 0 deletions
diff --git a/changes/bug23081 b/changes/bug23081
new file mode 100644
index 0000000000..76c4e30971
--- /dev/null
+++ b/changes/bug23081
@@ -0,0 +1,8 @@
+ o Minor bugfixes (Windows service):
+ - When running as a Windows service, set the ID of the main thread
+ correctly. Failure to do so made us fail to send log messages
+ to the controller in 0.2.1.16-rc, slowed down controller
+ event delivery in 0.2.7.3-rc and later, and crash with an assertion
+ failure in 0.3.1.1-alpha. Fixes bug 23081; bugfix on 0.2.1.6-alpha.
+ Patch and diagnosis from "Vort".
+
diff --git a/src/or/ntmain.c b/src/or/ntmain.c
index 4c65805b32..0e6f296d24 100644
--- a/src/or/ntmain.c
+++ b/src/or/ntmain.c
@@ -293,6 +293,7 @@ nt_service_body(int argc, char **argv)
* event loop */
service_status.dwCurrentState = SERVICE_RUNNING;
service_fns.SetServiceStatus_fn(hStatus, &service_status);
+ set_main_thread();
do_main_loop();
tor_cleanup();
}