[Toybox] [PATCH] Fix pgrep -s 0 when running in session ID 0

Colin Cross ccross at google.com
Fri Oct 6 15:10:03 PDT 2023


I came across an issue when running the pgrep -s 0 test in Android's
CI infrastructure that uses a PID namespace, causing the test to run
session ID 0:

$ sudo unshare -fp ./toybox pgrep -s 0
pgrep: bad -s '0'

The attached patch fixes the argument parsing to support getsid returning 0.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Fix-pgrep-s-0-when-running-in-session-ID-0.patch
Type: text/x-patch
Size: 1174 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20231006/1d13e17d/attachment.bin>


More information about the Toybox mailing list