lua-users home
lua-l archive

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


> The documentation says that lua_sethook "can be called asynchronously
> (e.g. during a signal)",

This is written in an internal comment, which is not part of the official
documentation.


> but if it's called from a signal handler that
> runs at just the "right" time (after a CallInfo gets created but
> before it gets linked into L->ci), and the currently running Lua code
> happens to be the "right" kind of infinite loop, then the hook
> function will never get called. As such, I'd consider it a bug,
> especially since you could rely on this working right in Lua 5.3.

If the signal happens after a CallInfo gets created but before it gets
linked into L->ci, then the code still have to enter the function,
which will call the 'call' hook. I don't see any bug here.

-- Roberto