[prev in list] [next in list] [prev in thread] [next in thread]
List: clamav-devel
Subject: [Clamav-devel] ClamAV milter doesn't close stdout/err when using
From: Chris Adams <cmadams () hiwaay ! net>
Date: 2008-07-25 14:20:39
Message-ID: 20080725142039.GB1056505 () hiwaay ! net
[Download RAW message or body]
If you configure clamav-milter to use syslog instead of a log file, it
does not properly close stdout and stderr when daemonizing. The patch
below fixes this.
--
Chris Adams <cmadams@hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.
diff -urN clamav-0.93.3-dist/clamav-milter/clamav-milter.c clamav-0.93.3/clamav-milter/clamav-milter.c
--- clamav-0.93.3-dist/clamav-milter/clamav-milter.c 2008-07-25 09:04:15.000000000 -0500
+++ clamav-0.93.3/clamav-milter/clamav-milter.c 2008-07-25 09:09:01.000000000 -0500
@@ -1858,6 +1858,8 @@
}
dup(consolefd);
#else
+ close(1);
+ open("/dev/null", O_WRONLY);
logg_file = NULL;
#endif
}
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic