mirror of
https://github.com/debauchee/barrier.git
synced 2025-06-17 02:01:41 +02:00
Fixed issue 506 - plus some quite major refactoring
This commit is contained in:
parent
a19e800b99
commit
24765e6891
8 changed files with 50 additions and 60 deletions
|
@ -200,21 +200,8 @@ mainLoopStatic()
|
|||
int
|
||||
CArchAppUtilWindows::daemonNTMainLoop(int argc, const char** argv)
|
||||
{
|
||||
app().parseArgs(argc, argv);
|
||||
|
||||
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"));
|
||||
}
|
||||
}
|
||||
|
||||
app().initialize(argc, argv);
|
||||
debugServiceWait();
|
||||
app().argsBase().m_backend = false;
|
||||
app().loadConfig();
|
||||
return CArchMiscWindows::runDaemon(mainLoopStatic);
|
||||
|
@ -301,3 +288,20 @@ CArchAppUtilWindows::instance()
|
|||
{
|
||||
return (CArchAppUtilWindows&)CArchAppUtil::instance();
|
||||
}
|
||||
|
||||
void
|
||||
CArchAppUtilWindows::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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue