You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by "Malte S. Stretz" <ms...@gmx.net> on 2004/02/11 21:57:13 UTC

to openlog() or not to openlog() (was: Re: svn commit: rev 6625 - incubator/spamassassin/trunk/spamd)

On Wednesday 11 February 2004 21:41 CET jm@apache.org wrote:
> added reply to FIXME

Replying on-list :)

>      # The next call is required to actually open the socket.
>      # FIXME: mss: wouldn't a openlog('spamd', 'cons,pid,ndelay',
> $log_facility); be better?
> # jm: no, it's unportable.  if I recall  correctly some perls will die
> syslog('debug', "%s", "spamd starting"); 

Are you really sure? The whole syslog() code looks like black magic to me 
and spamd does really weird things with metalog, I guess because of the 
missing $ident.

Currently we open the syslog via a syslog() call but do an openlog() on each 
logmsg() call. That looks more than weird.

And 'perldoc Sys::Syslog' doesn't say anything about known bugs like this, 
it just has a big fat sentence "You should use openlog() before calling 
syslog()."

Cheers,
Malte

-- 
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
      <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
      <http://www.catb.org/~esr/faqs/smart-questions.html>