On 12/16/2012 11:31:49 AM, David Seikel wrote:
On Sun, 16 Dec 2012 16:54:24 +0100 Elie De Brauwer
<eliedebrau...@gmail.com> wrote:

> The LSB specification of killall says "A killall process never kills
> itself (but may kill other killall processes)."
>
> The current implementation of killall does not adhere to this rule,
> with the patch in attach killall will adhere to this rule.
>
> Before:
> edb@lapedb:~/edb-stuff/toybox/toybox$ ./toybox killall -9 toybox
> Killed
>
> After:
> edb@lapedb:~/edb-stuff/toybox/toybox$ ./toybox killall -9 toybox
> killall: No such process

It's 3AM and way past my bed time, but after it's run out of things to
kill, it just kills itself.  Seems pointless to not allow suicide on
something that will just suicide anyway, but I need sleep.

Like rm'ing something that does not exist, the end result is the same,
except for the useless error.  The thing does not exist, killall is no
longer running.  The error message is superfluous, as the result you
wanted is exactly what you get.

I think the objection is that PIDs aren't monotonic (the PID namespace wraps), so if you kill things in increasing PID order this killall instance isn't guaranteed to be last so it won't necessarily kill everything it should.

Rob
_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to