[host] app: support force quitting

This makes it much less painful to develop the host, as sometimes it
hangs and ^C doesn't work.
This commit is contained in:
Quantum authored and Geoffrey McRae committed 2021-12-28 19:04:47 +11:00
1 parent 192fb1cdc7
commit 10110dd940
1 file changed
+6
+6
View File
@@ -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();
}