diff options
author | Craig Small <csmall@enc.com.au> | 2018-04-10 21:14:01 +1000 |
---|---|---|
committer | Craig Small <csmall@enc.com.au> | 2018-04-10 21:14:01 +1000 |
commit | 791cb72d32dd963a76fccc4b46facd906a4381fb (patch) | |
tree | 42b0d4e8aa909a09633282b91086763f154b5652 | |
parent | 0b488c7f5cac12408a3808daa42eec4efa63e955 (diff) | |
download | procps-ng-791cb72d32dd963a76fccc4b46facd906a4381fb.tar.gz |
Revert "Support running with child namespaces"
This reverts commit dcb6914f11406a13972636b08b7e26fdafe9efc9.
This commit broke a lot of scripts that were expecting to see all
programs. See #91
-rw-r--r-- | pgrep.c | 5 |
1 files changed, 3 insertions, 2 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> or 0 for all namespaces\n"), fp); + " namespace as <pid>\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,6 +861,8 @@ 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: @@ -914,7 +916,6 @@ int main (int argc, char **argv) textdomain(PACKAGE); atexit(close_stdout); - opt_ns_pid = getpid(); parse_opts (argc, argv); procs = select_procs (&num); |