[Toybox] [PATCH] killall: better handling of long names.

enh enh at google.com
Mon Jul 1 16:21:43 PDT 2019


Change names_to_pid() so that we can actually match shell scripts with
long names (the code to get the shell script's name was correct, but
there was an extra test preventing us from actually comparing it to the
sought name).

In kill.c itself, remove a dead test for -l and switch to the FLAG()
macro.

Also extend the tests to explicitly cover long and short names.
---
 lib/lib.c          |  2 +-
 tests/killall.test | 12 +++++++++---
 toys/lsb/killall.c | 12 ++++++------
 3 files changed, 16 insertions(+), 10 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-killall-better-handling-of-long-names.patch
Type: text/x-patch
Size: 3629 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190701/0d894b14/attachment-0002.bin>


More information about the Toybox mailing list