lua-users home
lua-l archive

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


On Sun, Jan 26, 2020 at 2:28 PM Levente Kovacs <leventelist@gmail.com> wrote:
I have a C application that runs a LUA script. That script might have an
infinite loop.

Is there any way in my C application to interrupt the script, do something,
and continue with the script?

You can use the debug library to insert the appropriate hook callbacks.

This is described in section 25.2 of "Programming in Lua" (4th ed).

See also section 25.4 "Sandboxing".

-Archie

--
Archie L. Cobbs