Tudor Bosman
2014-07-15 05:24:08 UTC
No, it's not the same "Ctrl-C won't raise a Lua error from compiled code"
issue again :)
If I catch Ctrl-C in an xpcall, any subsequent Ctrl-C will kill my program
unless LuaJIT gets back to top level (REPL).
Attaching an example (loop.lua). The program prints '1'; type Ctrl-C and
the error gets caught, and the program prints '2'; type Ctrl-C again and
the program exits. This doesn't happen if you call xpcall(loop, handler)
from the command line instead of from a script.
Thanks,
-Tudor.
issue again :)
If I catch Ctrl-C in an xpcall, any subsequent Ctrl-C will kill my program
unless LuaJIT gets back to top level (REPL).
Attaching an example (loop.lua). The program prints '1'; type Ctrl-C and
the error gets caught, and the program prints '2'; type Ctrl-C again and
the program exits. This doesn't happen if you call xpcall(loop, handler)
from the command line instead of from a script.
Thanks,
-Tudor.