I have been searching for some time and haven't found a definitive answer yet. The only link I found till now which sheds some light on this is here.
The syslog subroutine is not threadsafe; for threadsafe programs the syslog_r subroutine should be used instead. The syslog subroutine writes messages onto the system log maintained by the syslogd command.
openlog opens or reopens a connection to Syslog in preparation for submitting messages. ident is an arbitrary identification string which future syslog invocations will prefix to each message.
According to the POSIX Specification syslog(), openlog() and closelog() are thread safe.
There's another thread that answers this question as well and it is dated as far back as 2009. Here's the link syslog_r for Linux?.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With