The symbols referred to in this section are declared in the file syslog.h.
Preliminary: | MT-Safe | AS-Unsafe lock | AC-Unsafe lock fd | See POSIX Safety Concepts.
closelogcloses the current Syslog connection, if there is one. This includes closing the /dev/log socket, if it is open.
closelogalso sets the identification string for Syslog messages back to the default, if
openlogwas called with a non-NULL argument to ident. The default identification string is the program name taken from argv.
If you are writing shared library code that uses
openlogto generate custom syslog output, you should use
closelogto drop the GNU C Library's internal reference to the ident pointer when you are done. Please read the section on
openlogfor more information: See openlog.
closelogdoes not flush any buffers. You do not have to call
closelogbefore re-opening a Syslog connection with
openlog. Syslog connections are automatically closed on exec or exit.