lua-users home
lua-l archive

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


Hi Viacheslav

While a Lua script executes Lua bytecode, it can be stopped by
injecting a debug hook. But once it is inside a C function, standard
or third-party, nothing at all can be done (short of killing the
process). Why cannot we have an atomic flag in the Lua state structure
that can be set whenever we want to abort execution, which can then be
checked by potentially long running C functions? Not saying this is a
panacea, but this is something which would simplify building a
sandbox.
But as you said, this "long running C function" could be a third-party one, thus there is no guarantee the flag will be checked, isn't it?

Regards,
Tomás