On Mon, 02 Feb 2004 at 14:03:55 +0100, Krištof Petr wrote: > Tomasz Kojm wrote: > > >Unfortunately, I'm not familiar with logrotate. But will check the HUP > >handling tonight. Sorry ! > > > > Tomasz, > > you dont need to lose time with logrotate. This is simple step by step, > how to test it: > > 1) Start clamd > > 2) Remove clamd's log file > > 3) Sent SIGHUP to clamd > > 4a) You will got error > Mon Feb 2 13:58:35 2004 -> SIGHUP catched: log file re-opened. > Mon Feb 2 13:58:35 2004 -> ERROR: accept() failed. > > 4b) Clamd should will create new log file and start to log to it. > > This is the way the logrotate works. It removes old logfile and sends > SIGHUP to clamd to re-create log file and continue logging. >
I didn't look at the sources but I've always thought that log rotating is done different way. The current logfile is _moved_ to other filename, not removed (deleted). Due to this, the logfile is still open and new entries can be written to it. Then on reload or restart, the handle (file descriptor?) is released and the new logfile is created. Not earlier! I don't know if it makes any difference for clamd, though. -- Tomasz Papszun SysAdm @ TP S.A. Lodz, Poland | And it's only [EMAIL PROTECTED] http://www.lodz.tpsa.pl/ | ones and zeros. [EMAIL PROTECTED] http://www.ClamAV.net/ A GPL virus scanner ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Clamav-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/clamav-users