[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Watchdog for Lua
- From: "Todor Totev" <umbra.tenebris@...>
- Date: Wed, 07 Jun 2006 11:48:30 +0300
I want to limit the scripts to execute only for a specified period of
time. I.e. if the script executes for more than a second, lua should
Set hooks and test for the time inside the hook. Raise an error if the
time is up. If you're running Unix, you can set an alarm and insidethe
alarm handler set a hook to terminate the Lua run.See lua.c and my
Actually what I'm trying to achieve is protection from code like
while true do end
I checked the manual and I think that should use
where my_hook should call lua_error to stop the script.
Is this what you suggested?
And finally, where I can get your lalarm from?