[LTP] [PATCH 1/1] lib/tst_pid.c: Count used pid by traversing /proc
Petr Vorel
pvorel@suse.cz
Mon Feb 13 18:33:54 CET 2023
Hi Leo,
> Use "ps -eT | wc -l" to calculate the number of used pid
> could have an incorrectly larger result because "ps -eT"
> may list the same pid multiple times (with different SPID).
> Instead, we could count used pid by traversing /proc
> directory and count the subdirectories that have name
> composed of digits.
> Increase PIDS_RESERVED to avoid fork failure.
Thank you!
Waiting little longer before merging to give others change to have look.
Suggested-by: Petr Vorel <pvorel@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
More information about the ltp
mailing list