library: add support for the 'LIBPROC_HIDE_KERNEL' var

This patch was prompted by Björn Fischer's merge #147
request referenced below. It has been generalized such
that it now embraces both of those 'pids_fetch' types.

[ and thanks to Björn for initiating this extension ]

Reference(s):
https://gitlab.com/procps-ng/procps/-/merge_requests/147

Prototyped-by: Björn Fischer <bf@CeBiTec.Uni-Bielefeld.DE>
Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2022-01-04 00:00:00 +01:00
committed by Craig Small
parent cbff1dd106
commit 2a7ec67ac8
2 changed files with 15 additions and 1 deletions

View File

@@ -203,6 +203,7 @@ typedef struct PROCTAB {
uid_t *uids; // uids of procs
int nuid; // cannot really sentinel-terminate unsigned short[]
int i; // generic
int hide_kernel; // getenv LIBPROC_HIDE_KERNEL was set
unsigned flags;
unsigned u; // generic
void * vp; // generic