clamav/clamav-daemonize.patch

21 lines
329 B
Diff

--- shared/misc.c
+++ shared/misc.c
@@ -268,7 +268,7 @@
int i;
- if((i = open("/dev/null", O_WRONLY)) == -1) {
+ if((i = open("/dev/null", O_RDWR)) == -1) {
for(i = 0; i <= 2; i++)
close(i);
@@ -276,6 +276,8 @@
dup2(i, 0);
dup2(i, 1);
dup2(i, 2);
+ if (i > 2)
+ close(i);
}
if(fork())