problem with start-stop-daemon and --exec

Denys Vlasenko vda.linux at googlemail.com
Mon Mar 5 16:09:50 UTC 2012


On Mon, Mar 5, 2012 at 4:55 PM, Ed W <lists at wildgooses.com> wrote:
>  http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=blob;f=src/librc/librc-daemon.c;h=982da354da586dbb48766ae626de8b9f2b7a0335;hb=14b7f0e7fa1069827138d931952487b7c7db0d6a
>
> I'm actually struggling to get my head around how it's doing it's thing...
>  However, I don't obviously see that it's using /proc/pid/exe?

Now they seem to use /proc/pid/stat. Gosh... that's supposed to be used
for --name match!

>> I don't fully understand. Can you show a patch?
>
> Well, perhaps an illustration.  This works and kills the process
> /usr/sbin/nginx:
>
>        start-stop-daemon --stop --exec inx --pidfile /var/run/nginx.pid

Doesn't look like reasonable request for me.

> Note I don't recommend it's usually used like this (abbreviated --exec), but
> substring matching *would* work for my situation

And /proc/pid/exe match will also work.
IOW: the fix I committed should be enough. No?

-- 
vda


More information about the busybox mailing list