From b2ca9bc17b6d43461c788c11102803ada6a36159 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Mon, 24 Feb 2025 16:39:54 +0000 Subject: [PATCH] chore: Remove dead code from `--debug-service-wait` arg --- src/lib/deskflow/ArgsBase.h | 1 - src/lib/deskflow/win32/AppUtilWindows.cpp | 15 --------------- src/lib/deskflow/win32/AppUtilWindows.h | 1 - 3 files changed, 17 deletions(-) diff --git a/src/lib/deskflow/ArgsBase.h b/src/lib/deskflow/ArgsBase.h index d7f69670d..5e84a00ed 100644 --- a/src/lib/deskflow/ArgsBase.h +++ b/src/lib/deskflow/ArgsBase.h @@ -87,7 +87,6 @@ public: bool m_preventSleep = false; #if SYSAPI_WIN32 - bool m_debugServiceWait = false; bool m_stopOnDeskSwitch = false; #endif diff --git a/src/lib/deskflow/win32/AppUtilWindows.cpp b/src/lib/deskflow/win32/AppUtilWindows.cpp index ca32daaa5..11f41130e 100644 --- a/src/lib/deskflow/win32/AppUtilWindows.cpp +++ b/src/lib/deskflow/win32/AppUtilWindows.cpp @@ -67,7 +67,6 @@ static int mainLoopStatic() int AppUtilWindows::daemonNTMainLoop(int argc, const char **argv) { app().initApp(argc, argv); - debugServiceWait(); return ArchMiscWindows::runDaemon(mainLoopStatic); } @@ -135,20 +134,6 @@ AppUtilWindows &AppUtilWindows::instance() return (AppUtilWindows &)AppUtil::instance(); } -void AppUtilWindows::debugServiceWait() -{ - if (app().argsBase().m_debugServiceWait) { - while (true) { - // this code is only executed when the process is launched via the - // windows service controller (and --debug-service-wait arg is - // used). to debug, set a breakpoint on this line so that - // execution is delayed until the debugger is attached. - ARCH->sleep(1); - LOG((CLOG_INFO "waiting for debugger to attach")); - } - } -} - void AppUtilWindows::startNode() { app().startNode(); diff --git a/src/lib/deskflow/win32/AppUtilWindows.h b/src/lib/deskflow/win32/AppUtilWindows.h index cd94005cb..839cbff1b 100644 --- a/src/lib/deskflow/win32/AppUtilWindows.h +++ b/src/lib/deskflow/win32/AppUtilWindows.h @@ -36,7 +36,6 @@ public: int daemonNTStartup(int, char **); int daemonNTMainLoop(int argc, const char **argv); - void debugServiceWait(); int run(int argc, char **argv) override; void exitApp(int code) override; void startNode() override;