chore: Remove unused m_autoDetectCommand and ctor arg from Windows watchdog
This commit is contained in:
parent
44f72a29e9
commit
8c30ed7a59
3 changed files with 3 additions and 9 deletions
|
|
@ -212,7 +212,7 @@ void DaemonApp::mainLoop()
|
||||||
DAEMON_RUNNING(true);
|
DAEMON_RUNNING(true);
|
||||||
|
|
||||||
#if SYSAPI_WIN32
|
#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);
|
m_watchdog->setFileLogOutputter(m_fileLogOutputter);
|
||||||
|
|
||||||
// install the platform event queue to handle service stop events.
|
// install the platform event queue to handle service stop events.
|
||||||
|
|
|
||||||
|
|
@ -54,9 +54,8 @@ typedef VOID(WINAPI *SendSas)(BOOL asUser);
|
||||||
|
|
||||||
const char g_activeDesktop[] = {"activeDesktop:"};
|
const char g_activeDesktop[] = {"activeDesktop:"};
|
||||||
|
|
||||||
MSWindowsWatchdog::MSWindowsWatchdog(bool autoDetectCommand, bool foreground)
|
MSWindowsWatchdog::MSWindowsWatchdog(bool foreground)
|
||||||
: m_thread(NULL),
|
: m_thread(NULL),
|
||||||
m_autoDetectCommand(autoDetectCommand),
|
|
||||||
m_outputWritePipe(nullptr),
|
m_outputWritePipe(nullptr),
|
||||||
m_outputReadPipe(nullptr),
|
m_outputReadPipe(nullptr),
|
||||||
m_elevateProcess(false),
|
m_elevateProcess(false),
|
||||||
|
|
@ -372,10 +371,6 @@ void MSWindowsWatchdog::setProcessConfig(const std::string &command, bool elevat
|
||||||
|
|
||||||
std::string MSWindowsWatchdog::getCommand() const
|
std::string MSWindowsWatchdog::getCommand() const
|
||||||
{
|
{
|
||||||
if (!m_autoDetectCommand) {
|
|
||||||
return m_command;
|
|
||||||
}
|
|
||||||
|
|
||||||
// seems like a fairly convoluted way to get the process name
|
// seems like a fairly convoluted way to get the process name
|
||||||
const char *launchName = App::instance().argsBase().m_pname;
|
const char *launchName = App::instance().argsBase().m_pname;
|
||||||
std::string args = ARCH->commandLine();
|
std::string args = ARCH->commandLine();
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class MSWindowsWatchdog
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MSWindowsWatchdog(bool autoDetectCommand, bool foreground);
|
MSWindowsWatchdog(bool foreground);
|
||||||
~MSWindowsWatchdog() = default;
|
~MSWindowsWatchdog() = default;
|
||||||
|
|
||||||
void startAsync();
|
void startAsync();
|
||||||
|
|
@ -64,7 +64,6 @@ private:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Thread *m_thread;
|
Thread *m_thread;
|
||||||
bool m_autoDetectCommand;
|
|
||||||
bool m_running;
|
bool m_running;
|
||||||
HANDLE m_outputWritePipe;
|
HANDLE m_outputWritePipe;
|
||||||
HANDLE m_outputReadPipe;
|
HANDLE m_outputReadPipe;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue