[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 2021-12-28 03:00:17 -05:00 committed by Geoffrey McRae
parent 192fb1cdc7
commit 10110dd940

View File

@ -850,6 +850,12 @@ void app_shutdown(void)
void app_quit(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.exitcode = LG_HOST_EXIT_USER;
app_shutdown(); app_shutdown();
} }