P_D_PID flag is set only when option -p is used on the command line.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
}
if (!DISPLAY_PID(pidflag)) {
- pidflag |= P_D_ACTIVE_PID + P_D_PID + P_D_ALL_PID;
+ /*
+ * If no PIDs nor -p ALL entered on the command line then
+ * only active PIDs will be displayed.
+ */
+ pidflag |= P_D_ACTIVE_PID + P_D_ALL_PID;
}
if (!tskflag) {
__closedir(dir);
}
- else if (DISPLAY_PID(pidflag)) {
+ else {
/* Read stats for each PID in the list */
for (plist = pid_list; plist != NULL; plist = plist->next) {