From 10110dd94018d5c58bd65f2c11fb23febc4ba235 Mon Sep 17 00:00:00 2001 From: Quantum Date: Tue, 28 Dec 2021 03:00:17 -0500 Subject: [PATCH] [host] app: support force quitting This makes it much less painful to develop the host, as sometimes it hangs and ^C doesn't work. --- host/src/app.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/host/src/app.c b/host/src/app.c index c907c0ab..4f0ca54a 100644 --- a/host/src/app.c +++ b/host/src/app.c @@ -850,6 +850,12 @@ void app_shutdown(void) void app_quit(void) { + if (app.state == APP_STATE_SHUTDOWN) + { + DEBUG_INFO("Received second shutdown request, force quitting"); + exit(LG_HOST_EXIT_USER); + } + app.exitcode = LG_HOST_EXIT_USER; app_shutdown(); }