On 6/3/07, James Teh <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> As of version 0.90, clamd daemonizes before it loads the databases,
> creates the socket and begins accepting connections. Unfortunately, as
> the databases grow, clamd can take quite a while to initialise (I've
> seen upwards of 65 seconds on some slower or loaded systems). This
> causes problems for programs that rely on clamd being ready to accept
> connections. In order to ensure that clamd is fully initialised, it must
> be started and then one must continually check for the presence of the
> clamd socket file, which is not a particularly efficient or reliable
> solution. In 0.8x, this was not an issue because clamd did not daemonise
> until after database initialisation. Thus, one could simply wait for
> clamd to return (due to forking) and assume it was fully initialised.
>
> The issue is also described here:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=427154
> although a different solution is proposed.
>
> I have patched 0.90.3 to daemonise just before entering the socket
> accept loop. I am posting here rather than opening a bug in Bugzilla
> because I am uncertain as to whether this is considered a bug. This
> behaviour was probably changed for a reason and I am curious as to the
> reason. I will file a bug subject to responses from developers.
>
> Thanks for such a wonderful project.

If you are interested, there is a workaround to it on clamav-milter
startup script of FreeBSD ports, you can take a look at:

http://www.freebsd.org/cgi/cvsweb.cgi/ports/security/clamav/files/clamav-milter.in?rev=1.4;content-type=text%2Fplain

-- 
Renato Botelho
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net

Reply via email to