I used to see freshclam instances sleeping forever on both connect() and recv()/read() calls. To circumvent such hurdles, this patch causes freshclam to protect those calls with explicit configurable timeouts.
The patch has been tested under Solaris 10 on Sparc and Linux 2.4.27 on i686. It has been reported to work in Darwin (OS X 10.4.7) as well.
Note: Please use GNU patch to apply the patch.
gunzip -c clamav-0.88.x.tar.gz | tar xf - gunzip -c path/to/patchfile.gz | patch -p0 cd clamav-0.88.x aclocal automake configure make make install
export CVS_RSH=ssh cvs -d:ext:anoncvs@cvs.clamav.net:/cvsroot/clamav co clamav-devel gunzip -c path/to/patchfile.gz | patch -p0 cd clamav-devel aclocal automake configure make make install
The patch adds the following options to freshclam.conf:
# Timeout in seconds when connecting to database server. # Default: 10 #ConnectTimeout 30 # Timeout in seconds when reading from database server. # Default: 10 #RecvTimeout 30