diff options
author | Craig Small <csmall@enc.com.au> | 2018-03-03 18:00:56 +1100 |
---|---|---|
committer | Craig Small <csmall@enc.com.au> | 2018-03-03 18:00:56 +1100 |
commit | 3fc3a20523833a95b2d513b649ea7db9f9e610ed (patch) | |
tree | d9da87a011a647814d5b6a69d8d3f91edaf1568b | |
parent | 029a4631724fba1e2a99e740103e99e6b8409b36 (diff) | |
parent | dcb6914f11406a13972636b08b7e26fdafe9efc9 (diff) | |
download | procps-ng-3fc3a20523833a95b2d513b649ea7db9f9e610ed.tar.gz |
Merge branch 'dbanerje/procps-namespace'
References:
procps-ng/procps!41
-rw-r--r-- | pgrep.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -129,7 +129,7 @@ static int __attribute__ ((__noreturn__)) usage(int opt) fputs(_(" -F, --pidfile <file> read PIDs from file\n"), fp); fputs(_(" -L, --logpidfile fail if PID file is not locked\n"), fp); fputs(_(" --ns <PID> match the processes that belong to the same\n" - " namespace as <pid>\n"), fp); + " namespace as <pid> or 0 for all namespaces\n"), fp); fputs(_(" --nslist <ns,...> list which namespaces will be considered for\n" " the --ns option.\n" " Available namespaces: ipc, mnt, net, pid, user, uts\n"), fp); @@ -861,8 +861,6 @@ static void parse_opts (int argc, char **argv) * break; */ case NS_OPTION: opt_ns_pid = atoi(optarg); - if (opt_ns_pid == 0) - usage ('?'); ++criteria_count; break; case NSLIST_OPTION: @@ -916,6 +914,7 @@ int main (int argc, char **argv) textdomain(PACKAGE); atexit(close_stdout); + opt_ns_pid = getpid(); parse_opts (argc, argv); procs = select_procs (&num); |