Folks, I can't find the re-entrant version of syslog() for Linux...is there one? And if no, what do you? The obvious answer is to move logging facility into separate thread and serialise access to syslog...
+5
A:
According to the POSIX specification, the syslog function is already thread-safe, and so implemented in Linux. So syslog_r is unnecessary - use syslog if you need a reentrant logger function.
Martin v. Löwis
2009-07-22 05:36:42
The BSDs define a syslog_r call, however, for an entirely different reason; individual threads may want to log with different syslog options, which is not otherwise possible.
Michiel Buddingh'
2009-07-22 05:45:27
Right - that function is not available on Linux.
Martin v. Löwis
2009-07-22 05:56:53