lua-users home
lua-l archive

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


On Mon, May 18, 2020 at 5:53 PM Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:

> Signals are hard to handle in ISO C. ISO C gives very little guarantees and mechanisms to handle them. Likewise, Lua never gave any guarantees about its handling of signals, and Lua 5.4 follows this pattern.

It may indeed have been a new question, but the question was about "a loop _in pure lua code_ that does not ever call a hook
function", not about signals. And I believe the question can be qualified further so that the "pure Lua code" does not directly or indirectly call any library, including built-in library, code. The only permissible "native" code would be Lua itself (without libs) and the (custom) memory allocator. Assuming the latter is always bounded, the expected answer is that "eventually a hook function will be called" - is that the case in Lua 5.4?

Lua by its nature is frequently used in a sandbox [*], where taking the entire host down because one Lua instance is in an infinite loop would be very costly.

Cheers,
V.

[*] Which means that any other native code is off-limits or is (hopefully) conditioned to behave.
_______________________________________________
lua-l mailing list -- lua-l@lists.lua.org
To unsubscribe send an email to lua-l-leave@lists.lua.org