[PATCH] Make start-stop-daemon handle sending signals better

Natanael Copa natanael.copa at gmail.com
Wed Aug 30 05:55:21 UTC 2006


On Tue, 2006-08-29 at 20:18 -0400, Rob Landley wrote:
> On Monday 28 August 2006 5:17 pm, Jason Schoon wrote:
> > On 8/28/06, Natanael Copa <natanael.copa at gmail.com> wrote:
> > >
> > >
> > > There is a bug about syslogd not starting (looks like the problem
> > > affects any busybox applet)
> > >
> > > http://bugs.busybox.net/view.php?id=770
> > >
> > >
> > On this one, I see the problem, but I don't know a clean, correct solution.
> 
> I don't use Debian-only stuff, so I dunno what start-stop-daemon is trying to
> do.  Not familiar with that command.
> 
> > The problem is that start-stop-daemon looks through the list of processes
> > and checks if the new one is already running by comparing device and inode.
> 
> 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

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.

> But that doesn't help if
> somebody calls "busybox httpd", does it?

You'd never call "busybox httpd" with start-stop-daemon --exec.

--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.

> 
> Rob
> --
> Never bet against the cheap plastic solution.




More information about the busybox mailing list