summaryrefslogtreecommitdiff
blob: 43cf5b2ef9af65a23b35670643448f456644fa38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
If /proc isnt mounted, `top` will cause screen corruption ...

--- b/top/top.c
+++ b/top/top.c
@@ -3201,6 +3201,12 @@
 {
    (void)dont_care_argc;
    before(*argv);
+
+   if (access("/proc/stat", F_OK)) {
+      fprintf(stderr, "/proc is not mounted, required for output data");
+      exit(1);
+   }
+
                                         //                 +-------------+
    windows_stage1();                    //                 top (sic) slice
    configs_read();                      //                 > spread etc, <