top: ensure /proc is mounted before term is diddled

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2012-04-24 23:08:02 -05:00 committed by Craig Small
parent 39243fe306
commit 04ca0b1cbf

View File

@ -2101,9 +2101,13 @@ static void sysinfo_refresh (int forced) {
* No matter what *they* say, we handle the really really BIG and * No matter what *they* say, we handle the really really BIG and
* IMPORTANT stuff upon which all those lessor functions depend! */ * IMPORTANT stuff upon which all those lessor functions depend! */
static void before (char *me) { static void before (char *me) {
static proc_t p;
struct sigaction sa; struct sigaction sa;
int i; int i;
// is /proc mounted?
look_up_our_self(&p);
// setup our program name // setup our program name
Myname = strrchr(me, '/'); Myname = strrchr(me, '/');
if (Myname) ++Myname; else Myname = me; if (Myname) ++Myname; else Myname = me;