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) {
|
if (foreground) {
|
||||||
// run process in foreground instead of daemonizing.
|
// add a console to catch Ctrl+C and run process in foreground
|
||||||
// useful for debugging.
|
// instead of daemonizing. useful for debugging.
|
||||||
|
if (IsDebuggerPresent())
|
||||||
|
AllocConsole();
|
||||||
mainLoop(false);
|
mainLoop(false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue