[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Watchdog for Lua
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 6 Jun 2006 16:30:11 -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 terminate it
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 inside the alarm
handler set a hook to terminate the Lua run. See lua.c and my lalarm.
--lhf