chore: Remove unused m_autoDetectCommand and ctor arg from Windows watchdog

This commit is contained in:
Nick Bolton 2025-03-03 11:15:08 +00:00
parent 44f72a29e9
commit 8c30ed7a59
3 changed files with 3 additions and 9 deletions

View file

@ -212,7 +212,7 @@ void DaemonApp::mainLoop()
DAEMON_RUNNING(true);
#if SYSAPI_WIN32
m_watchdog = std::make_unique<MSWindowsWatchdog>(false, m_foreground);
m_watchdog = std::make_unique<MSWindowsWatchdog>(m_foreground);
m_watchdog->setFileLogOutputter(m_fileLogOutputter);
// install the platform event queue to handle service stop events.

View file

@ -54,9 +54,8 @@ typedef VOID(WINAPI *SendSas)(BOOL asUser);
const char g_activeDesktop[] = {"activeDesktop:"};
MSWindowsWatchdog::MSWindowsWatchdog(bool autoDetectCommand, bool foreground)
MSWindowsWatchdog::MSWindowsWatchdog(bool foreground)
: m_thread(NULL),
m_autoDetectCommand(autoDetectCommand),
m_outputWritePipe(nullptr),
m_outputReadPipe(nullptr),
m_elevateProcess(false),
@ -372,10 +371,6 @@ void MSWindowsWatchdog::setProcessConfig(const std::string &command, bool elevat
std::string MSWindowsWatchdog::getCommand() const
{
if (!m_autoDetectCommand) {
return m_command;
}
// seems like a fairly convoluted way to get the process name
const char *launchName = App::instance().argsBase().m_pname;
std::string args = ARCH->commandLine();

View file

@ -31,7 +31,7 @@ class MSWindowsWatchdog
};
public:
MSWindowsWatchdog(bool autoDetectCommand, bool foreground);
MSWindowsWatchdog(bool foreground);
~MSWindowsWatchdog() = default;
void startAsync();
@ -64,7 +64,6 @@ private:
private:
Thread *m_thread;
bool m_autoDetectCommand;
bool m_running;
HANDLE m_outputWritePipe;
HANDLE m_outputReadPipe;