[Pkg-clamav-devel] Bug#511688: Bug#511688: "/etc/init.d/clamav-milter stop" doesn't stop the clamav-milter daemon

Stephen Gran sgran at debian.org
Tue Jan 13 15:24:03 UTC 2009

This one time, at band camp, Bruno Tréguier said:
> The script "/etc/init.d/clamav-milter" doesn't do a proper job when
> trying to stop the daemon. This is due to the fact that the file
> containing the PID (/var/run/clamav/clamav-milter.pid) in fact holds the
> process group ID, which is negative, and line 88 of the script, which is
> supposed to kill the daemon, is as follows:
>     kill -15 -"$PID" 2>/dev/null || true
> The minus sign before "$PID" shouldn't be there, as it is already
> included in the PID contained in the /var/run/clamav/clamav-milter.pid
> file. That line should read:
>     kill -15 "$PID" 2>/dev/null || true
> Hope that helps, and please be indulgent about the rather free form of 
> my patch (it's only 1 line anyway ;-) ).

If you look at how PID is defined, the leading '-' is stripped off
before it gets to that point (or should be).  Can you provide the output
sh -x /etc/init.d/clamav-milter stop

on a run that fails to stop it?

|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran at debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-clamav-devel/attachments/20090113/ca284dea/attachment.pgp 

More information about the Pkg-clamav-devel mailing list