Hi,

Here are diffs which add description of signals that user can send to
freshclam and clamd. One of those patches moves logg() in freshclam.c
little lower, so that logs are unified, no matter is user running
daemonized freshclam, on foreground or sometimes even both. I've also
commented out "--foreground" option from freshclam's help(). Changes
where made against snapshot 20050730. Native speaker should check my
diffs to man pages.

I've also send some time ago changes to libmspack included with
clamav[1].

References
 1. http://lurker.clamav.net/message/20050721.092025.dd20bcda.en.html

-- 
best regards
q#
$OpenBSD$
--- docs/man/clamd.8.in.orig    Mon Sep 27 22:53:24 2004
+++ docs/man/clamd.8.in Sat Jul 30 15:10:03 2005
@@ -48,6 +48,12 @@ Print the version number and exit.
 .TP 
 \fB\-c FILE, \-\-config\-file=FILE\fR
 Read configuration from FILE.
+.SH "SIGNALS"
+.LP
+.TP
+\fBSIGHUP\fR
+Causes freshclam to close and reopen its log file and update virus databases.
+This is useful in scripts which rotate and age log files.
 .SH "FILES"
 .LP 
 @CFGDIR@/clamd.conf
$OpenBSD$
--- docs/man/freshclam.1.in.orig        Sun Jun 19 01:00:56 2005
+++ docs/man/freshclam.1.in     Sat Jul 30 15:09:41 2005
@@ -73,6 +73,18 @@ Execute COMMAND after successful update.
 (2) Run as a daemon and check 2 times per day for new database:
 
 \fBfreshclam \-d \-c 2\fR
+.SH "SIGNALS"
+.LP
+.TP
+\fBSIGHUP\fR
+Causes freshclam to close and reopen its log file and update virus databases.
+This is useful in scripts which rotate and age log files.
+.TP
+\fBSIGUSR1\fR
+Wake up freshclam daemon and update virus signatures immediately.
+.TP
+\fBALRM\fR
+Same as SIGUSR1.
 .SH "RETURN CODES"
 0 : Database successfully updated.
 .TP 
$OpenBSD$
--- freshclam/freshclam.c.orig  Tue Jun  7 03:40:08 2005
+++ freshclam/freshclam.c       Sat Jul 30 15:59:19 2005
@@ -318,7 +318,6 @@ int freshclam(struct optstruct *opt)
                    execute("OnErrorExecute", arg);
            }
 
-           logg("--------------------------------------\n");
            sigaction(SIGALRM, &sigact, &oldact);
            sigaction(SIGUSR1, &sigact, &oldact);
            time(&wakeup);
@@ -329,6 +328,7 @@ int freshclam(struct optstruct *opt)
                time(&now);
            } while (!terminate && now < wakeup);
 
+           logg("--------------------------------------\n");
            if (terminate == -1) {
                logg("Received signal: wake up\n");
                terminate = 0;
@@ -436,7 +436,7 @@ void help(void)
     mprintf("    --config-file=FILE                   read configuration from 
FILE.\n");
     mprintf("    --log=FILE           -l FILE         log into FILE\n");
     mprintf("    --daemon             -d              run in daemon mode\n");
-    mprintf("    --foreground         -f              run daemon in 
foreground\n");
+    /* mprintf("    --foreground         -f              run daemon in 
foreground\n"); */
     mprintf("    --pid=FILE           -p FILE         save daemon's pid in 
FILE\n");
     mprintf("    --user=USER          -u USER         run as USER\n");
     mprintf("    --no-dns                             force old non-DNS 
verification method\n");
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html

Reply via email to