Skip to content

Commit

Permalink
Minor bug-fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Atoptool committed Jun 23, 2015
1 parent 6f01059 commit 67f5b44
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion man/atop.1
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ Whether this key is active or not can be seen in the header line.
.PP
.TP 5
.B I
Specify a list ith one or more PIDs to be selected.
Specify a list with one or more PIDs to be selected.
From now on, only processes will be shown with a PID which matches
one of the given list.
The system statistics are still system wide.
Expand Down
18 changes: 15 additions & 3 deletions showgeneric.c
Original file line number Diff line number Diff line change
Expand Up @@ -2198,9 +2198,21 @@ procsuppress(struct tstat *curstat, struct pselection *sel)
** check if only processes with a particular command line string
** should be shown
*/
if (sel->argnamesz &&
regexec(&(sel->argregex), curstat->gen.cmdline, 0, NULL, 0))
return 1;
if (sel->argnamesz)
{
if (curstat->gen.cmdline[0])
{
if (regexec(&(sel->argregex), curstat->gen.cmdline,
0, NULL, 0))
return 1;
}
else
{
if (regexec(&(sel->argregex), curstat->gen.name,
0, NULL, 0))
return 1;
}
}

return 0;
}
Expand Down

0 comments on commit 67f5b44

Please sign in to comment.