diff options
author | Craig Small <csmall@dropbear.xyz> | 2022-12-12 16:46:36 +1100 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2022-12-12 16:46:36 +1100 |
commit | f7a33746f8484629df9055f9a2dc5654f377c2fe (patch) | |
tree | 0bc579c238ddfa8fc6d6b05ab5d83d99508956f6 /src | |
parent | 31117ae10e3b224b286a88b4925702ba94c86a97 (diff) | |
download | procps-ng-f7a33746f8484629df9055f9a2dc5654f377c2fe.tar.gz |
skill: Restore the -p flag functionality
When the skill program was ported to the new API the code to filter
on PID, used by the -p option, was missed. It is now restored.
References:
https://bugs.debian.org/1025915
Diffstat (limited to 'src')
-rw-r--r-- | src/skill.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/skill.c b/src/skill.c index 9f617bf..c2e5274 100644 --- a/src/skill.c +++ b/src/skill.c @@ -287,6 +287,8 @@ static void scan_procs(struct run_time_conf_t *run_time) for (i=0; i < total_procs; i++) { if (PIDS_GETINT(PID) == my_pid || PIDS_GETINT(PID) == 0) continue; + if (pids && !match_intlist(PIDS_GETINT(PID), pid_count, pids)) + continue; if (uids && !match_intlist(PIDS_GETUNT(EUID), uid_count, (int *)uids)) continue; if (ttys && !match_intlist(PIDS_GETINT(TTY), tty_count, ttys)) |