[BusyBox] kill

David Douthitt ssrat at mailbag.com
Wed Oct 25 16:37:13 UTC 2000


On 25 Oct 2000, at 9:44, Erik Andersen wrote:

> On Wed Oct 25, 2000 at 07:48:33AM -0500, David Douthitt wrote:

> > How hard would it be to sort it by signal number?  I looked at the 
> 
> About 5 minutes with an editor (vim is my personal choice).

Mine too!

> No need to sort this stuff at runtime.  It isn't like SIGKILL is
> going to be changing its signal number on us.  So simply ordering
> them in the source is fine. 

That was my first thought; but if you read the code, it mentions that 
other systems have other numbers for their signals.  However, it does 
occur to me that busybox doesn't run except under i386 right?  Or 
does it?  What does Debian-68k use for ITS boot floppies?

> > you'd have to put in some sort of quick and dirty sort 
> > routine; in this case, a bubble sort ought to be enough right?
> 
> I suppose if the performance of killing signals by name were important, a
> bubble sort would be nice.  But it isn't too critical a path.  If you need
> speed, then kill by number (i.e. 'kill -9 9876' or 'killall -9 evilapp').  I
> suppose a simple binary search, wouldn't add much weight over the current
> linear one.  But is it really worth the bother for so small a set of signals on
> a non-fast path part of the code?

I wasn't talking about "kill -9" or "kill -HUP" but rather "kill -l". 
I don't see as any of those need changing; just "kill -l".

-- 
David Douthitt
UNIX Systems Administrator
HP-UX, Linux, Unixware
ddouthitt at mennonite.minister.net





More information about the busybox mailing list