Paul, > One problem I did see (and fix) is that syslog returns an > empty string if there is no error.
Actually it doesn't. It is explicitly stated in the documentation that syslog(3) routine returns no value. And Unix::Syslog::syslog just passes-on the result. If anything shows up, it is just a coincidence. > So I changed the code you had to use "''" instead of "0" as the > test value. It still sets it to "0" before the syslog call. Perl variable $! is double typed: in a numerical context it returns errno, in a string context it returns a system error string. Testing for zero in a numerical context is cleaner, does not depend on mapping of an error number to strings. > I did some looking at the perl syslog module. It isn't pretty, > and I don't think that code to return an error value is consistent. > However, I do think that what you've done should work, based on my > limited testing. I also checked the source of a syslog routine (in FreeBSD sources, which should be close to OS X), and it turns out that our approach is futile. Ths syslog routine does its own retry on failure, and does not care what errno it returns on exit. On a successful retry the errno still reflects a previous unsuccessfull attempt. Checking out amavisd log for the last couple of days confirms it, all retries done by amavisd actually resulted in duplicate log entries. So I'm abandoning this futile attempts, the 2.5.1-rc1 will no longer do syslog retries. I also checked Postfix source. No syslog retries there either. My guess is that your log rotation stops syslogd for a while and restarts it, instead of just renaming files and sending it a HUP. Applications really lose their syslog output when syslog daemon is unavailable for a while. I've never seen a loss after sending a HUP to syslog, even though I tried it repeatedly under a busy logging load. Mark ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ AMaViS-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/
