mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-03 22:14:26 +08:00
add console for ctrl+c to daemon app when debugging in foreground
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user