From 53909db6870072ca83e18706a8172f72da480bef Mon Sep 17 00:00:00 2001 From: Frans de Jonge Date: Fri, 25 Dec 2020 16:19:16 +0100 Subject: [PATCH] Close Lua state on all os.exit() calls (#7050) Cf. . --- frontend/device/input.lua | 2 +- frontend/ui/uimanager.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/device/input.lua b/frontend/device/input.lua index 761fe8149..32016912e 100644 --- a/frontend/device/input.lua +++ b/frontend/device/input.lua @@ -823,7 +823,7 @@ function Input:waitEvent(timeout_us) break elseif ev == "application forced to quit" then --- @todo return an event that can be handled - os.exit(0) + os.exit(0, true) end logger.warn("got error waiting for events:", ev) if ev ~= "Waiting for input failed: 4\n" then diff --git a/frontend/ui/uimanager.lua b/frontend/ui/uimanager.lua index 3d78d8c80..4242d0e29 100644 --- a/frontend/ui/uimanager.lua +++ b/frontend/ui/uimanager.lua @@ -1278,7 +1278,7 @@ function UIManager:handleInput() io.stderr:write(debug.traceback() .. "\n") io.stderr:flush() self.looper:close() - os.exit(1) + os.exit(1, true) end) end) end