Bug#157305: start-stop-daemon: spurious error message when using --pidfile and --retry together
- To: Tobias Burnus <tobias.burnus@physik.fu-berlin.de>, Chris Lawrence <cnlawren@phy.olemiss.edu>, Thomas Hood <jdthood@yahoo.co.uk>, Marc Haber <mh+debian-packages@zugschlus.de>, Adam Heath <doogie@brainfood.com>, 157305@bugs.debian.org, control@bugs.debian.org
- Cc: Debian Bug Tracking System <submit@bugs.debian.org>, control@bugs.debian.org, 157305@bugs.debian.org
- Subject: Bug#157305: start-stop-daemon: spurious error message when using --pidfile and --retry together
- From: Loic Minier <lool@dooz.org>
- Date: Sat, 28 Aug 2004 21:15:48 +0200
- Message-id: <[🔎] 20040828191548.GA3578@via.ecp.fr>
- Reply-to: Loic Minier <lool@dooz.org>, 157305@bugs.debian.org
- In-reply-to: <Pine.LNX.4.44.0309132154380.26334-100000@gradall.private.brainfood.com> <20031216155620.GA22303@torres.ka0.zugschlus.de> <1033465875.26369.1328.camel@thanatos> <1029954646.1033.6.camel@olympus> <1029954646.1033.6.camel@olympus> <E17gsVY-0003Bb-00@warp9.physik.fu-berlin.de>
- References: <Pine.LNX.4.44.0309132154380.26334-100000@gradall.private.brainfood.com> <1033465875.26369.1328.camel@thanatos> <20031216155620.GA22303@torres.ka0.zugschlus.de> <1033465875.26369.1328.camel@thanatos> <E17gsVY-0003Bb-00@warp9.physik.fu-berlin.de> <1029954646.1033.6.camel@olympus> <E17gsVY-0003Bb-00@warp9.physik.fu-berlin.de> <1029954646.1033.6.camel@olympus> <E17gsVY-0003Bb-00@warp9.physik.fu-berlin.de>
tags 157305 +patch
thanks
Hi,
This is a follow-up to an old start-stop-daemon bug, #157305.
Tobias Burnus <tobias.burnus@physik.fu-berlin.de> - Mon, Aug 19, 2002:
> /sbin/start-stop-daemon: warning: failed to kill 12180: No such process
> if there is a proccess that is killed.
> If no killable process is there. Nothing is outputed.
> The output failed to kill 12180 is strange since the process had been killed.
> /sbin/start-stop-daemon --stop --pidfile /var/run/zedv_hunter.pid --retry 5 --signal TERM --quiet --oknodo
> If I remove the --retry 5 it works.
Thomas Hood <jdthood@yahoo.co.uk> - Tue, Oct 01, 2002:
> I was able to reproduce this bug. Simply create a process,
> put its pid in a file, and call start-stop-daemon:
> sudo start-stop-daemon --stop --pidfile /tmp/pidfile --retry 5
> The result is the error message:
> start-stop-daemon: warning: failed to kill 2679: No such process
> which is presumably generated on the second pass of the retry sequence.
A check is missing in ssd when the process is only pointed by its pid,
ssd doesn't check that the pid is running. The attached patch fixes
this problem.
A temporary workaround is to use --name or --exec in the
start-stop-daemon command line.
Regards,
--
Loïc Minier <lool@dooz.org>
diff -ur dpkg-1.10.23-orig/utils/start-stop-daemon.c dpkg-1.10.23/utils/start-stop-daemon.c
--- dpkg-1.10.23-orig/utils/start-stop-daemon.c 2004-07-19 20:56:49.000000000 +0200
+++ dpkg-1.10.23/utils/start-stop-daemon.c 2004-08-28 21:00:33.000000000 +0200
@@ -734,7 +734,8 @@
return;
if (start && !pid_is_running(pid))
return;
- push(&found, pid);
+ if (stop && pid_is_running(pid))
+ push(&found, pid);
}
static void
Reply to: