Stephen Gran wrote : > 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 > of > sh -x /etc/init.d/clamav-milter stop > > on a run that fails to stop it? > > Cheers,
Sure ! Here you are: r...@kayak:~# sh -x /etc/init.d/clamav-milter stop + PATH=/sbin:/bin:/usr/sbin:/usr/bin + DAEMON=/usr/sbin/clamav-milter + DESC='Sendmail milter plugin for ClamAV' + BASENAME=clamav-milter + CLAMAVCONF=/etc/clamav/clamd.conf + DEFAULT=/etc/default/clamav-milter + OPTIONS=-dq + SUPERVISOR=/usr/bin/daemon + SUPERVISORPIDFILE=/var/run/clamav/daemon-clamav-milter.pid + SUPERVISORARGS='-F /var/run/clamav/daemon-clamav-milter.pid --name=clamav-milter --respawn' + '[' -x /usr/sbin/clamav-milter ']' + '[' -r /etc/clamav/clamd.conf ']' + '[' -r /etc/default/clamav-milter ']' + . /etc/default/clamav-milter ++ OPTIONS='--max-children=2 -ol' + '[' -z '' ']' + PIDFILE=/var/run/clamav/clamav-milter.pid + '[' -z '' ']' + SOCKET=local:/var/run/clamav/clamav-milter.ctl + . /lib/lsb/init-functions ++ FANCYTTY= ++ '[' -e /etc/lsb-base-logging.sh ']' ++ true + case "$SOCKET" in ++ echo local:/var/run/clamav/clamav-milter.ctl ++ sed -e s/local:// + SOCKET_PATH=/var/run/clamav/clamav-milter.ctl + egrep -qi '^Foreground[[:space:]]*(yes|true|1)' /etc/clamav/clamd.conf + '[' -z '' ']' + '[' -f /var/run/clamav/clamav-milter.pid ']' ++ pidofproc -p /var/run/clamav/clamav-milter.pid /usr/sbin/clamav-milter ++ local pidfile line i pids= status specified pid ++ pidfile= ++ specified= ++ OPTIND=1 ++ getopts p: opt ++ case "$opt" in ++ pidfile=/var/run/clamav/clamav-milter.pid ++ specified=1 ++ getopts p: opt ++ shift 2 ++ '[' -z /var/run/clamav/clamav-milter.pid ']' ++ '[' -f /var/run/clamav/clamav-milter.pid ']' ++ read pid ++ '[' -n -22983 ']' +++ kill -0 -22983 ++ echo -22983 ++ return 0 + PID=-22983 + RUNNING=0 + '[' -22983 = 1 ']' + case "$1" in + OPTIND=1 + log_daemon_msg 'Stopping Sendmail milter plugin for ClamAV' clamav-milter + '[' -z 'Stopping Sendmail milter plugin for ClamAV' ']' + '[' -z clamav-milter ']' + echo -n 'Stopping Sendmail milter plugin for ClamAV: clamav-milter' Stopping Sendmail milter plugin for ClamAV: clamav-milter+ '[' -n -22983 ']' + kill -15 --22983 + true + ret=0 + sleep 2 + kill -0 -22983 + ret=0 + log_progress_msg 'Waiting . ' + '[' -z 'Waiting . ' ']' + echo -n ' Waiting . ' Waiting . + cnt=0 + kill -0 -22983 + ret=0 ++ expr 0 + 1 + cnt=1 + '[' 1 -gt 15 ']' + sleep 2 + log_progress_msg '. ' + '[' -z '. ' ']' + echo -n ' . ' . + kill -0 -22983 + ret=0 ++ expr 1 + 1 + cnt=2 + '[' 2 -gt 15 ']' + sleep 2 + log_progress_msg '. ' + '[' -z '. ' ']' + echo -n ' . ' . + kill -0 -22983 + ret=0 ++ expr 2 + 1 + cnt=3 + '[' 3 -gt 15 ']' + sleep 2 etc. etc. Notice the double dash on the "kill -15" line... Of course you can't see the error output because of the 2>/dev/null redirection in the script, but here it is, when you launch it by hand: r...@kayak:~# kill -15 --22983 -bash: kill: --22983: arguments must be process or job IDs Regards, Bruno _______________________________________________ Pkg-clamav-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/pkg-clamav-devel
