[Toybox] [PATCH] pidof: fix default behavior, add -x.
enh
enh at google.com
Thu Jul 11 14:03:33 PDT 2019
Before this patch, we're effectively doing `pidof -x` all the time. This
patch changes names_to_pid() to allow us to say whether or not we want to
include scripts, and adjusts the callers appropriately.
Also add tests for `pidof` versus `pidof -x` which pass after this
patch, without regressing the existing killall tests.
---
lib/lib.c | 21 ++++++++++++---------
lib/lib.h | 3 ++-
tests/pidof.test | 33 +++++++++++++++++++++++++++++++++
toys/lsb/killall.c | 2 +-
toys/lsb/pidof.c | 5 +++--
toys/pending/bootchartd.c | 38 ++++++++++++--------------------------
6 files changed, 63 insertions(+), 39 deletions(-)
create mode 100644 tests/pidof.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-pidof-fix-default-behavior-add-x.patch
Type: text/x-patch
Size: 7860 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190711/ac334c5c/attachment-0002.bin>
More information about the Toybox
mailing list