Re: syslog() reentrant when compiling with -pthread?

2004-10-07 Thread Giorgos Keramidas
On 2004-10-07 07:20, Marc Balmer [EMAIL PROTECTED] wrote: 1) openlog() must be called before any threads that use syslog() are started. 2) The first argument to openlog() must not be NULL. 3) The %m Format String must not be used in syslog() calls. Can (3) this be solved by changing all the

syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Marc Balmer
Hi I am a long time Unix developer but new with FreeBSD. I worked the last years mostly with OpenBSD. First I am overwhelmed by the number of mailing lists you guys provide. Second I am not sure if I picked the right one ;-) So please direct me to the right place if this list is only for

Re: syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Dan Nelson
In the last episode (Oct 06), Marc Balmer said: I am a long time Unix developer but new with FreeBSD. I worked the last years mostly with OpenBSD. First I am overwhelmed by the number of mailing lists you guys provide. Second I am not sure if I picked the right one ;-) So please direct me to

Re: syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Dan Nelson
In the last episode (Oct 06), Dan Nelson said: My question regarding thread-safeness of syslog(): On OpenBSD I used syslog_r() to do thread safe logging (the software in question is a sendmail milter, which runs multithreaded). FreeBSD does not have these functions, but the cc man page

Re: syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Robert Dormer
For what it's worth, I've used syslog to the *console* before, in a multithreaded network daemon. No problems encountered. On Wed, 6 Oct 2004 16:28:32 +0200, Marc Balmer [EMAIL PROTECTED] wrote: Hi I am a long time Unix developer but new with FreeBSD. I worked the last years mostly with

Re: syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Julian Elischer
you probably want [EMAIL PROTECTED] Marc Balmer wrote: Hi I am a long time Unix developer but new with FreeBSD. I worked the last years mostly with OpenBSD. First I am overwhelmed by the number of mailing lists you guys provide. Second I am not sure if I picked the right one ;-) So please

Re: syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Marc Balmer
Am 06.10.2004 um 16:48 schrieb Dan Nelson: The only unsafe part is openlog(), so set that up before you start any threads and you'll be okay. Once the log fd is opened, the syslog() call looks to be thread-safe. Everything in there is done with local variables and atomic writes. At least on

Re: syslog() reentrant when compiling with -pthread?

2004-10-06 Thread Dan Nelson
In the last episode (Oct 07), Marc Balmer said: At least on OpenBSD I can use %m in the syslog() format string. This results in a call to strerror(), which is not thread safe, AFAIK. This probably is true for FreeBSD as well, so we have the following three conditions for thread safe