From d75168ca03cec27c2b9f67732a1035b5c84fcd4f Mon Sep 17 00:00:00 2001 From: Anthony Birkett Date: Thu, 21 Jan 2016 15:22:05 +0000 Subject: Fix running as a service. Two problems identified, both traced to commit 4315a11 (main.cpp) ParseArguments() was no longer being called before checking cRoot::m_RunAsService. This led to m_RunAsService never being set (we use -d on the command line to instigate a service start). (Root.cpp) Terminate events were being ignored when running as a service. We only need to ignore the cin.good() call, not terminate events as a whole. --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 06f979097..1b77e2480 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -495,6 +495,9 @@ int main(int argc, char ** argv) } #endif + // Make sure m_RunAsService is set correctly before checking it's value + ParseArguments(argc, argv); + // Attempt to run as a service if (cRoot::m_RunAsService) { -- cgit v1.2.3