代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/procps-ng 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 6e1715d9ebcffd7a673cbacbca4416c42d103c7b Mon Sep 17 00:00:00 2001
From: Jim Warner <james.warner@comcast.net>
Date: Sun, 13 Sep 2020 00:00:00 -0500
Subject: [PATCH] top: fix additional SEGVs if no tasks were displayable
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 f57a0301e3adfa5fd456404a200182c7f21da03a
Signed-off-by: Jim Warner <james.warner@comcast.net>
---
top/top.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/top/top.c b/top/top.c
index 1147938..2afe648 100644
--- a/top/top.c
+++ b/top/top.c
@@ -5897,6 +5897,8 @@ static void do_key (int ch) {
write_rcfile();
goto all_done;
default: // and now, the real work...
+ // and just in case 'Monpids' is active but matched no processes ...
+ if (!Frame_maxtask && ch != '=') goto all_done;
for (i = 0; i < MAXTBL(key_tab); ++i)
if (strchr(key_tab[i].keys, ch)) {
key_tab[i].func(ch);
--
2.22.0.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。