add console for ctrl+c to daemon app when debugging in foreground
This commit is contained in:
parent
ecfa7d7d1c
commit
fe818a4955
|
@ -130,8 +130,10 @@ DaemonApp::run(int argc, char** argv)
|
|||
}
|
||||
|
||||
if (foreground) {
|
||||
// run process in foreground instead of daemonizing.
|
||||
// useful for debugging.
|
||||
// add a console to catch Ctrl+C and run process in foreground
|
||||
// instead of daemonizing. useful for debugging.
|
||||
if (IsDebuggerPresent())
|
||||
AllocConsole();
|
||||
mainLoop(false);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue