[haiku-development] kill vs. killall

  • From: gus knight <waddlesplash@xxxxxxxxx>
  • To: Haiku Development ML <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 19 Jul 2015 14:27:25 -0400

Hi,

BeOS R5 had the functionality that the "kill" shell command could kill
applications by name. Rene Gollent implemented this by patching Bash's
builtin "kill"; however, this patch is extremely buggy:

* Sometimes "kill processname" doesn't do anything, and will insist
the process doesn't exist, even when ProcessController sees the
process and can kill it just fine
* On x86_64 Haiku (I haven't seen this on x86_32 Haiku -- yet),
sometimes the "kill" command will kill the parent shell (where the
"kill" command is executed) instead of killing the targeted
application
* "kill -9" doesn't actually work, at least, if the application is
hung, it is no better than a regular "kill" (ProcessController is
still able to kill a hanging application in this case)

Even though BeOS R5 had this, it wasn't documented behavior, and there
aren't any known uses of it. Modern Linux/*BSD has this functionality
in a command called "killall", instead of "kill".

Is there any reason we shouldn't ditch the "kill" patch and instead
use "killall"?

-gus

Other related posts:

  • » [haiku-development] kill vs. killall - gus knight