Post by Rob Landley Post by David Seikel Post by Rob Landley Post by David Seikel
Like rm'ing something that does not exist, the end result is the
same, except for the useless error.
$ rm doesnotexist
rm: cannot remove `doesnotexist': No such file or directory
You're thinking rm -f maybe?
Post by David Seikel Post by Rob Landley Post by David Seikel
The thing does not exist,
killall is no longer running. The error message is
Post by Rob Landley Post by David Seikel
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.
A valid objection for not killing yourself until you are done
killing everyone else. No excuse for an error message though, once
killall is done, the requested task is accomplished, that's not an
error, that's success.
$ killall doesnotexist
doesnotexist: no process found
You're thinking killall -q maybe? Which toybox implements?
./toybox killall -q killall
Yes, the "killall killall" case that this thread is all about.
I'm just ranting against the fact that getting the end result you asked
for (the thing you are trying to delete does not exist, the thing you
are trying to kill is dead) is considered an error. The state of
things is precisely how you wanted them to be, what's the point of
declaring that as an error condition?
It's just a rant, nothing more. I know toybox will continue to stick to
the the standards. I'm allowed to point out that I think the standards
are stupid some times. I think it's particularly hilarious that the
only way to "successfully" remove something that does not exist is to
forcefully remove it. Kinda like beating a dead horse, by nuking it
from orbit, the horse isn't any more dead. lol
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: not available