[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: how to implement cleaning function ( atexit() like )
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 4 Apr 2013 08:38:05 -0300
> 2/ how can I implement atexit like stuff in Lua ?
Set a gc metamethod for a table that is keep safely in a global variable.
> 3/ is this function called even when the daemon will receive a SIGQUIT
> signal ?
The standard Lua interpreter does not handle SIGQUIT. You can either
change it or use your own Lua host. You can also try to do signal
handling using luaposix.