mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Close Lua state on all os.exit() calls (#7050)
Cf. <https://github.com/koreader/koreader/pull/7044>.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user