From 2fa3bb06692aa8537454331515f93818d9d43746 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Tue, 5 Mar 2019 07:59:48 +1100 Subject: [PATCH] misc: update for pgrep runstate Added some minor fixes and notes --- NEWS | 2 ++ pgrep.1 | 2 +- pgrep.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 201e7467..622f81c6 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ procps-ng-NEXT ---------------- * docs: Use correct symbols for -h option in free.1 Debian #898774 * docs: ps.1 now warns about command name length issue #101 + * pgrep: Match on runstate issue 109 + Debian #919381 * top: can now exploit 256-color terminals issue #96 * top: preserves 'other filters' in configuration file issue #99 * top: can now collapse/expand forest view children issue #99 diff --git a/pgrep.1 b/pgrep.1 index 9e6c889c..3d731eca 100644 --- a/pgrep.1 +++ b/pgrep.1 @@ -7,7 +7,7 @@ .\" the Free Software Foundation; either version 2 of the License, or .\" (at your option) any later version. .\" -.TH PGREP "1" "2017-12-22" "procps-ng" "User Commands" +.TH PGREP "1" "2019-03-05" "procps-ng" "User Commands" .SH NAME pgrep, pkill \- look up or signal processes based on name and other attributes .SH SYNOPSIS diff --git a/pgrep.c b/pgrep.c index 903ec84d..86b7be2d 100644 --- a/pgrep.c +++ b/pgrep.c @@ -560,7 +560,7 @@ static struct el * select_procs (int *num) match = 0; if (strchr(opt_runstates, task.state)) match = 1; } - + if (task.cmdline && (opt_longlong || opt_full) ) { int i = 0; int bytes = sizeof (cmdline);