lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Thank you, and Ben (who came with almost the exact same response) !

Exactly what I was looking for. Had missed that signals was trapped in lua.c
I take it that calling lua_sethook() in c is safe even when lua is executing
some function.

Luiz Henrique de Figueiredo wrote:
I'm wondering if I'm abusing the lua environment with the way I'm forwarding
the c interrupts from the hardware to lua, if that may cause problems.


Probably. Calling Lua from a hardware interrupt in C when Lua is running
is probably dangerous. See lua.c for a way to treat C signals, which you
may adapt to your interrupts.
--lhf