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.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user