freshclam currently daemonises() and writes the pidfile _after_ it has setuid() to clamav. Depending on the clamav user and the permissions of the /var/run/ directory this may prevent freshclam from writing a pidfile. Might it not be better to daemonise() and write the pidfile _before_ the setuid() ?
/Per Jessen, Zürich _______________________________________________ http://lurker.clamav.net/list/clamav-devel.html
