diff options
author | Renato Botelho <garga@FreeBSD.org> | 2010-12-16 17:43:46 +0000 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2010-12-16 17:43:46 +0000 |
commit | 5fd53e4b0ffc9ad5ed8d0bdcfb1faa2f09096ab0 (patch) | |
tree | e7cceef326b2dfd71017891e33b95aae73501292 | |
parent | - Fix AMR dependencies (and thus, plist outside of tb. avidemux now (diff) |
- On 0.96.5, clamav was leaving some zombie proccess of freshclam, fix it.
- Bump PORTREVISION
Submitted by: Herbert J. Skuhra <h.skuhra@gmail.com>
Obtained from: http://git.clamav.net/gitweb?p=clamav-devel.git;a=commitdiff;h=2e136dcd0d7c34dc742475529db022d80d0dde2e
http://git.clamav.net/gitweb?p=clamav-devel.git;a=commitdiff;h=3c91587c8c894e898345086ef8e7a072fdf7b1bc
Notes
Notes:
svn path=/head/; revision=266440
-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; |