diff options
-rw-r--r-- | security/clamav/Makefile | 1 | ||||
-rw-r--r-- | security/clamav/files/patch-clamd__others.c | 11 | ||||
-rw-r--r-- | security/clamav/files/patch-freshclam__manager.c | 30 |
3 files changed, 42 insertions, 0 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile index c31f800d5b73..ff2ba2565a6e 100644 --- a/security/clamav/Makefile +++ b/security/clamav/Makefile @@ -7,6 +7,7 @@ PORTNAME= clamav PORTVERSION= 0.96.5 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= SF diff --git a/security/clamav/files/patch-clamd__others.c b/security/clamav/files/patch-clamd__others.c new file mode 100644 index 000000000000..8276847fa95c --- /dev/null +++ b/security/clamav/files/patch-clamd__others.c @@ -0,0 +1,11 @@ +--- clamd/others.c.orig 2010-11-05 10:48:02.000000000 +0100 ++++ clamd/others.c 2010-12-16 15:41:59.000000000 +0100 +@@ -146,7 +146,7 @@ + exit(execle("/bin/sh", "sh", "-c", buffer_cmd, NULL, env)); + } else if(pid > 0) { /* parent */ + pthread_mutex_unlock(&virusaction_lock); +- waitpid(pid, NULL, 0); ++ while(waitpid(pid, NULL, 0) == -1 && errno == EINTR); + } else { + logg("!VirusEvent: fork failed.\n"); + } diff --git a/security/clamav/files/patch-freshclam__manager.c b/security/clamav/files/patch-freshclam__manager.c new file mode 100644 index 000000000000..38989c453a7a --- /dev/null +++ b/security/clamav/files/patch-freshclam__manager.c @@ -0,0 +1,30 @@ +--- freshclam/manager.c.orig 2010-11-23 12:41:18.000000000 +0100 ++++ freshclam/manager.c 2010-12-16 15:40:54.000000000 +0100 +@@ -1476,7 +1476,7 @@ + char lastline[256]; + int pipefd[2]; + pid_t pid; +- int status = 0; ++ int status = 0, ret; + FILE *f; + + if (pipe(pipefd) == -1) { +@@ -1513,7 +1513,8 @@ + } + fclose(f); + +- if (waitpid(pid, &status, 0) == -1 && errno != ECHILD) ++ while ((ret = waitpid(pid, &status, 0)) == -1 && errno == EINTR); ++ if (ret == -1 && errno != ECHILD) + logg("^waitpid() failed: %s\n", strerror(errno)); + cli_chomp(firstline); + cli_chomp(lastline); +@@ -1523,7 +1524,7 @@ + lastline); + } + if (WIFEXITED(status)) { +- int ret = WEXITSTATUS(status); ++ ret = WEXITSTATUS(status); + if (ret) { + logg("^Database load exited with status %d\n", ret); + return ret; |