lua-users home
lua-l archive

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


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).