Open justinmk opened 1 year ago
I think there are two solutions:
os.exit()
function. For -ll
override it with a function that calls nlua_free_all_mem()
and exit()
. For -l
override it with a function that calls os_exit()
.nlua_free_all_mem()
as an atexit()
callback. Only works for -ll
, as for -l
all cleanup steps in os_exit()
are needed to avoid leaking memory, and an atexit()
callback cannot change exit code in case event_teardown()
fails.Override the Lua
os.exit()
function.
I think that is appropriate. It's like print()
which we also override.
Problem
observed in https://github.com/neovim/neovim/pull/24508