Browse code

support SIGUSR2

git-svn: trunk@396

Tomasz Kojm authored on 2004/03/13 21:50:39
Showing 3 changed files
... ...
@@ -1,3 +1,7 @@
1
+Sat Mar 13 13:52:51 CET 2004 (tk)
2
+---------------------------------
3
+  * clamd: support SIGUSR2 and force a database reload
4
+
1 5
 Thu Mar 11 21:50:32 CET 2004 (tk)
2 6
 ---------------------------------
3 7
   * libclamav: rar: added support for encrypted archive (Encrypted.RAR)
... ...
@@ -2,6 +2,32 @@ Note: This README/NEWS file refers to the source tarball. Some things described
2 2
 here may not be available in binary packages.
3 3
 --
4 4
 
5
+
6
+0.70
7
+----
8
+
9
+
10
+We are happy to announce new programs that support ClamAV (all of them
11
+have been reviewed by us):
12
+    + j-chkmail - a powerful filter for sendmail
13
+    + qscanq - Virus Scanning for Qmail
14
+    + clamavr - Ruby binding for ClamAV
15
+    + DansGuardian Anti-Virus Plugin
16
+    + ClamAssassin - a filter for procmail
17
+    + Gadoyanvirus - a filter for Qmail
18
+    + OpenProtect - a complete e-mail protection solution
19
+    + POP3 Virus Scanner Daemon
20
+    + mailman-clamav - a virus filter for Mailman
21
+    + wbmclamav - a webmin module to manage ClamAV
22
+    + Scan Log Analyzer
23
+    + mailgraph - a RRDtool frontend for Postfix Statistics
24
+    + INSERT - a security toolkit on a credit card size CD
25
+    + Local Area Security - a Live CD Linux distribution
26
+
27
+
28
+
29
+
30
+
5 31
 0.67
6 32
 ----
7 33
 This release fixes a memory management problem (platform dependent; can lead
... ...
@@ -107,6 +107,12 @@ void sighandler_th(int sig)
107 107
 	    sighup = 1;
108 108
 	    break;
109 109
 
110
+	case SIGUSR2:
111
+	    pthread_mutex_lock(&reload_mutex);
112
+	    reload = 1;
113
+	    pthread_mutex_unlock(&reload_mutex);
114
+	    break;
115
+
110 116
 	default:
111 117
 	    break; /* Take no action on other signals - e.g. SIGPIPE */
112 118
     }
... ...
@@ -358,6 +364,7 @@ int acceptloop_th(int socketd, struct cl_node *root, const struct cfgstruct *cop
358 358
     sigdelset(&sigset, SIGSEGV);
359 359
     sigdelset(&sigset, SIGHUP);
360 360
     sigdelset(&sigset, SIGPIPE);
361
+    sigdelset(&sigset, SIGUSR2);
361 362
     sigprocmask(SIG_SETMASK, &sigset, NULL);
362 363
  
363 364
     /* SIGINT, SIGTERM, SIGSEGV */
... ...
@@ -367,13 +374,17 @@ int acceptloop_th(int socketd, struct cl_node *root, const struct cfgstruct *cop
367 367
     sigaddset(&sigact.sa_mask, SIGTERM);
368 368
     sigaddset(&sigact.sa_mask, SIGHUP);
369 369
     sigaddset(&sigact.sa_mask, SIGPIPE);
370
+    sigaddset(&sigact.sa_mask, SIGUSR2);
370 371
     sigaction(SIGINT, &sigact, NULL);
371 372
     sigaction(SIGTERM, &sigact, NULL);
372 373
     sigaction(SIGHUP, &sigact, NULL);
373 374
     sigaction(SIGPIPE, &sigact, NULL);
374
-    
375
-    if(!debug_mode)
375
+    sigaction(SIGUSR2, &sigact, NULL);
376
+
377
+    if(!debug_mode) {
378
+	sigaddset(&sigact.sa_mask, SIGHUP);
376 379
 	sigaction(SIGSEGV, &sigact, NULL);
380
+    }
377 381
 
378 382
 #if defined(C_BIGSTACK) || defined(C_BSD)
379 383
     /*