22 lines
653 B
Diff
22 lines
653 B
Diff
Description: Exit top if cannot openproc
|
|
Author: Justin Pryzby <justinpryzby@users.sourceforge.net>
|
|
Bug-Debian: http://bugs.debian.org/378695
|
|
Reviewed-by: Craig Small <csmall@debian.org>
|
|
Index: b/top.c
|
|
===================================================================
|
|
--- a/top.c 2009-11-24 21:00:33.000000000 +1100
|
|
+++ b/top.c 2009-11-24 21:00:34.000000000 +1100
|
|
@@ -1106,6 +1106,12 @@
|
|
else
|
|
PT = openproc(flags);
|
|
|
|
+ if (PT==NULL) {
|
|
+ std_err(strerror(errno));
|
|
+ exit(1);
|
|
+ }
|
|
+
|
|
+
|
|
// i) Allocated Chunks: *Existing* table; refresh + reuse
|
|
if (!(CHKw(Curwin, Show_THREADS))) {
|
|
while (curmax < savmax) {
|