[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: how to implement cleaning function ( atexit() like )
- From: Laurent Faillie <l_faillie@...>
- Date: Thu, 04 Apr 2013 13:26:31 +0200
Hello,
I'm working on a Unix daemon in Lua which is using posix' syslog.
In C, I would use atexit() to ensure that closelog() what ever the way
the daemon exits.
1/ Is it really needed or is the "channel" automatically closed when the
process is dying ?
2/ how can I implement atexit like stuff in Lua ?
3/ is this function called even when the daemon will receive a SIGQUIT
signal ?
(because it will be the standard way to stop the daemon).
Thanks
Laurent