[PATCH 2/2] start-stop-daemon - find processes better
Roy Marples
roy at marples.name
Wed Apr 30 07:27:11 PDT 2008
On Wednesday 30 April 2008 14:37:31 Denys Vlasenko wrote:
> On Wednesday 30 April 2008 13:40, Joakim Tjernlund wrote:
> > On Wed, 2008-04-30 at 12:18 +0100, Roy Marples wrote:
> > > start-stop-daemon uses stat to match running binaries.
> > > This is not good as the binary in question could be moved or deleted
> > > during an upgrade.
>
> When it is moved or deleted, and replaced by a new file with the same name,
> is this the same binary or not?
>
> I bet if you do a poll, results will be split about 50:50.
But the intent of start-stop-daemon is to start and stop daemons.
s-s-d --stop --exec /usr/sbin/ntpd
I would that expect it to stop the currently running ntpd process regardless
of if the binary itself still exists or not.
> > It
> > wont work when cmdline i a symlink. Should you not use --name instead
> > to handle the deleted case?
But this is good :)
Consider busybox - loads of things symlink into it, like udhcpd. So are you
stopping udhcpd or all instances of busybox daemons?
Thanks
Roy
More information about the busybox
mailing list