]> granicus.if.org Git - procps-ng/commitdiff
top: parallel the master branch pids monitoring change
authorJim Warner <james.warner@comcast.net>
Sat, 10 Aug 2019 00:00:00 +0000 (00:00 +0000)
committerCraig Small <csmall@dropbear.xyz>
Sat, 21 Sep 2019 21:32:03 +0000 (07:32 +1000)
This commit will just parallel a pending master branch
merge request referenced below. Note, however, that it
is not really needed in this newlib branch because the
procps_pids_select() function itself provides a 'zero'
delimiter with every caller's designated list of pids.

[ since it's required under the master branch, we're ]
[ repeating it here just for documentation purposes. ]

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

Originally-by: Yoann Lecuyer <yoann.lecuyer@gmail.com>
Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c

index d75810f62f7d2f7b029f8a7453b71a6c93ca35c6..045748e95bfa4233c6a42b657217d71b98042038 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -90,7 +90,7 @@ static float       Cpu_pmax;
 static const char *Cpu_States_fmts;
 
         /* Specific process id monitoring support */
-static unsigned Monpids [MONPIDMAX] = { 0 };
+static unsigned Monpids [MONPIDMAX+1] = { 0 };
 static int      Monpidsidx = 0;
 
         /* Current screen dimensions.