diff options
Diffstat (limited to 'src/pgrep.c')
-rw-r--r-- | src/pgrep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pgrep.c b/src/pgrep.c index 7d0cc93..6679a8c 100644 --- a/src/pgrep.c +++ b/src/pgrep.c @@ -706,8 +706,8 @@ static struct el * select_procs (int *num) match = 0; else if (opt_older && (int)PIDS_GETFLT(ELAPSED) < opt_older) match = 0; - else if (opt_term) - match = match_strlist(PIDS_GETSTR(TTYNAME), opt_term); + else if (opt_term && ! match_strlist(PIDS_GETSTR(TTYNAME), opt_term)) + match = 0; else if (opt_runstates && ! strchr(opt_runstates, PIDS_GETSCH(STA))) match = 0; else if (opt_cgroup && ! match_cgroup_list (PIDS_GETSTV(CGROUP), opt_cgroup)) |