From c3f4fea40cef5c7940463edb14aa4081619c36fa Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 12 Mar 1995 01:47:08 +0000 Subject: [PATCH] Don't use curses until initialized. --- usr.bin/systat/main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c index 07975f3568e..69523c9803a 100644 --- a/usr.bin/systat/main.c +++ b/usr.bin/systat/main.c @@ -111,14 +111,6 @@ main(argc, argv) error("%s", errbuf); exit(1); } - if (kvm_nlist(kd, namelist)) { - nlisterr(namelist); - exit(1); - } - if (namelist[X_FIRST].n_type == 0) { - fprintf(stderr, "couldn't read namelist.\n"); - exit(1); - } signal(SIGINT, die); signal(SIGQUIT, die); signal(SIGTERM, die); @@ -141,6 +133,14 @@ main(argc, argv) fprintf(stderr, "Couldn't set up load average window.\n"); die(0); } + if (kvm_nlist(kd, namelist)) { + nlisterr(namelist); + exit(1); + } + if (namelist[X_FIRST].n_type == 0) { + fprintf(stderr, "couldn't read namelist.\n"); + exit(1); + } gethostname(hostname, sizeof (hostname)); NREAD(X_HZ, &hz, LONG); NREAD(X_STATHZ, &stathz, LONG);