[Toybox] [PATCH] ps: exit with exit status 1 if no processes shown.

enh enh at google.com
Thu Aug 26 17:14:53 PDT 2021


This matches procps ps, and at least one LTP test relies on it. The
behavior is specifically "nothing matches", not "one PID didn't match":
assuming no process 666, `ps 666` exits with 1, but `ps 1 666` exits
with 0.
---
 toys/posix/ps.c | 1 +
 1 file changed, 1 insertion(+)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210826/2b3056ab/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ps-exit-with-exit-status-1-if-no-processes-shown.patch
Type: text/x-patch
Size: 844 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20210826/2b3056ab/attachment.bin>


More information about the Toybox mailing list