[Toybox] [PATCH] Fix killall prompt.

Rob Landley rob at landley.net
Tue Sep 8 15:06:19 PDT 2015


On 09/07/2015 07:32 PM, enh wrote:
> Fix killall prompt.
> 
> I'm not sure how much we care, but the " ?" was deliberately done to
> match the desktop.

*squints*

*tilts head*

Do we _want_ a ? in the middle of the prompt? Yes, xubuntu's version is
doing that, but... why?

Huh. No posix spec, LSB says -i but nothing about the prompt, man page
doesn't describe it either...

> Since I'm here, the desktop also switches between
> "Kill" and "Signal" as the verb depending on the specific signal.
> (Though the -v output always uses "kill".)

Hmmm...

  $ sleep 10000 &
  $ killall -i15 sleep
  [ help text dump, heh, good to know. ]
  $ killall -i -15 sleep
  Kill sleep(25653) ? (y/N) y

So yes... that is the behavior it's doing, but...

  $ killall -9 sleep -i
  Signal sleep(4432) ? (y/N)

kill -9 is signal, not kill? I wonder:

  $ busybox killall -i -15 sleep
  killall: bad signal name 'i'

Riiight. That's today's git. "git log --follow */kill.c | cat" has the
initial commit in 1999 (and that was a tree snapshot), so for at least
16 years nobody's ever bothered to implement -i.

Digging out my old Red Hat 9 image from 2003 and booting it under
qemu... (Last time I'm aware of that a single Linux distro had 50% of
the Linux desktop was before Red Hat abandoned the desktop because it
had figured out how to eat Sun's lunch, so I still occasionally pull it
out as a historical frame of reference...) And that says "Kill" rather
than "Signal" for -9 and -STOP, but otherwise has the weird ? in midstream.

Right.

You cared enough about this behavior to send me a patch, which means you
care more than I do. I can apply this, it's a small inoffensive patch,
but could you tell me why you want this before I do that? Did something
actually need it, or just "it's different, therefore"...?

Thanks,

Rob

(It's the aesthetic issues that are the hardest because there _is_ no
right answer, just different ways to be wrong.)

 1441749979.0


More information about the Toybox mailing list