This patch is an outgrowth of that commit shown below.
Many additional potential segmentation faults might be
encountered if interactive commands are opened up to a
user when a '-p' switch has a single non-existent pid.
[ always the 'k', 'L', 'r', 'Y' keys & maybe 'v' too ]
So, this patch will restrict such a loser (oops, user)
to a reduced subset of normal commands until he/she/it
quits then restarts top with something to be displayed
or issues the '=' command overriding that '-p' switch.
Reference(s):
commit
d3203d99dd7f4508447ea3b4b056a9d134229d10
Signed-off-by: Jim Warner <james.warner@comcast.net>
write_rcfile();
goto all_done;
default: // and now, the real work...
+ // and just in case 'Monpids' is active but matched no processes ...
+ if (!PIDSmaxt && ch != '=') goto all_done;
for (i = 0; i < MAXTBL(key_tab); ++i)
if (strchr(key_tab[i].keys, ch)) {
key_tab[i].func(ch);