Browse code

handle signals while polling in select mode

git-svn: trunk@2839

aCaB authored on 2007/02/23 02:19:19
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Thu Feb 22 15:43:33 CET 2007 (acab)
2
+-----------------------------------
3
+  * clamd: handle signals while polling in select mode
4
+
1 5
 Thu Feb 22 14:57:10 GMT 2007 (njh)
2 6
 ----------------------------------
3 7
   * clamav-milter/clamav-milter.c:	Fix typo
... ...
@@ -225,7 +225,7 @@ int poll_fds(int *fds, int nfds, int timeout_sec, int check_signals)
225 225
 	retval = select(maxfd+1, &rfds, NULL, NULL,
226 226
 			(timeout_sec>0 ? &tv : NULL));
227 227
 	if (retval == -1) {
228
-	    if (errno == EINTR) {
228
+	    if (errno == EINTR && !check_signals) {
229 229
 		continue;
230 230
 	    }
231 231
 	    return -1;