[PATCH] Make start-stop-daemon handle sending signals better
Rob Landley
rob at landley.net
Wed Aug 30 16:29:17 UTC 2006
On Wednesday 30 August 2006 1:55 am, Natanael Copa wrote:
> > Which is a broken heuristic where busybox is involved. I believe the
second
> > field of /proc/$pid/stat gives you the name the executable was originally
> > called under (even if was called by path or rewrote its argv[0] or some
> > such), and that's what "killall" goes based off of.
>
> That is what 'start-stop-daemon --name' uses. I would rather go for
> argv[0], using first field in /proc/$pid/cmdline
BusyBox doesn't modify its command line anymore, aside from the getopt()
permutation (which I hope to remove someday).
> See patch I posted with subject "[PATCH] proposal for fix bug 770
> (start-stop-daemon)"
>
> http://busybox.net/lists/busybox/2006-August/023949.html
>
> It works even if --exec arg is a symblink to busybox.
So why doesn't start-stop-daemon --name work then? (The name it uses
dereferences the symlink?)
> > But that doesn't help if
> > somebody calls "busybox httpd", does it?
>
> You'd never call "busybox httpd" with start-stop-daemon --exec.
Well, I wouldn't, no. But that has more to do with start-stop-daemon, and not
particularly trusting our current httpd daemon to be able to serve even
static pages...
> --exec require you have a full pathname to executable and if you use
> --exec /bin/busybox <anything> you are telling ssd to check
> if /bin/busybox is alredy running before starting another.
Sounding a bit like pilot error.
Ok, so confirming: the fix checks to make sure that there isn't a version
running that was called under the same name as the one we're about to launch?
Does the command line's argv[0] include the path it was called at?
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list