aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/windows/service.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-10-04 14:49:04 +0200
committerGitHub <[email protected]>2023-10-04 14:49:04 +0200
commit05d415a12e73a36ca9133b7b66ccc03057e65883 (patch)
tree9175fe21be95a9fec5c2f4fdb4875d99c5dd10cc /src/zenserver/windows/service.cpp
parentshared server config (#438) (diff)
downloadzen-05d415a12e73a36ca9133b7b66ccc03057e65883.tar.xz
zen-05d415a12e73a36ca9133b7b66ccc03057e65883.zip
added thread names (#441)
added names to process handle GC thread and main thread for easier identification in crash dumps / process monitoring
Diffstat (limited to 'src/zenserver/windows/service.cpp')
-rw-r--r--src/zenserver/windows/service.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/zenserver/windows/service.cpp b/src/zenserver/windows/service.cpp
index 21116f1c4..cb87df1f6 100644
--- a/src/zenserver/windows/service.cpp
+++ b/src/zenserver/windows/service.cpp
@@ -7,7 +7,7 @@
#if ZEN_PLATFORM_WINDOWS
# include <zencore/except.h>
-# include <zencore/zencore.h>
+# include <zencore/thread.h>
# include <stdio.h>
# include <tchar.h>
@@ -151,6 +151,8 @@ CallMain(DWORD, LPSTR*)
int
WindowsService::ServiceMain()
{
+ zen::SetCurrentThreadName("svc-main");
+
gSvc = this;
SERVICE_TABLE_ENTRY DispatchTable[] = {{(LPWSTR)SVCNAME, (LPSERVICE_MAIN_FUNCTION)&CallMain}, {NULL, NULL}};