You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2004/02/11 21:41:20 UTC
svn commit: rev 6625 - incubator/spamassassin/trunk/spamd
Author: jm
Date: Wed Feb 11 12:41:19 2004
New Revision: 6625
Modified:
incubator/spamassassin/trunk/spamd/spamd.raw
Log:
added reply to FIXME
Modified: incubator/spamassassin/trunk/spamd/spamd.raw
==============================================================================
--- incubator/spamassassin/trunk/spamd/spamd.raw (original)
+++ incubator/spamassassin/trunk/spamd/spamd.raw Wed Feb 11 12:41:19 2004
@@ -293,6 +293,7 @@
defined(setlogsock($log_socket)) || die $!;
# 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");
};
my $err = $@;
@@ -325,7 +326,7 @@
# The user wants to log to some file -- open it on STDLOG. Falling back to STDERR
# if opening the file fails.
elsif ($log_facility eq 'file') {
- unless(open(STDLOG, ">> $log_file")) {
+ unless(open(STDLOG, ">>$log_file")) {
warn "failed to open logfile ${log_file}: $!\n" .
"reporting logs to stderr\n";
$log_facility = 'stderr';
to openlog() or not to openlog() (was: Re: svn commit: rev 6625 - incubator/spamassassin/trunk/spamd)
Posted by "Malte S. Stretz" <ms...@gmx.net>.
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>