From 04ca0b1cbf978a7accb0404340e5355e33b2084a Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Tue, 24 Apr 2012 23:08:02 -0500 Subject: [PATCH] top: ensure /proc is mounted before term is diddled Signed-off-by: Jim Warner --- top/top.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/top/top.c b/top/top.c index 108805ba..da073707 100644 --- a/top/top.c +++ b/top/top.c @@ -2101,9 +2101,13 @@ static void sysinfo_refresh (int forced) { * No matter what *they* say, we handle the really really BIG and * IMPORTANT stuff upon which all those lessor functions depend! */ static void before (char *me) { + static proc_t p; struct sigaction sa; int i; + // is /proc mounted? + look_up_our_self(&p); + // setup our program name Myname = strrchr(me, '/'); if (Myname) ++Myname; else Myname = me;