diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-10-04 07:47:54 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-10-04 07:47:54 +0000 |
commit | e56876c85e192ffa99f5d5e723eb061816839ecb (patch) | |
tree | 965201334d6a86be2c6db535770be7ae76ff0bc6 | |
parent | 58733c1d19169fd5def7853af2dd6b06be06a448 (diff) |
only init screen when in interactive mode; ok ray@
-rw-r--r-- | usr.bin/top/top.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c index 47e36ce9341..26181c20503 100644 --- a/usr.bin/top/top.c +++ b/usr.bin/top/top.c @@ -1,4 +1,4 @@ -/* $OpenBSD: top.c,v 1.56 2007/09/27 19:44:54 otto Exp $ */ +/* $OpenBSD: top.c,v 1.57 2007/10/04 07:47:53 otto Exp $ */ /* * Top users/processes display for Unix @@ -386,7 +386,8 @@ main(int argc, char *argv[]) sigaddset(&mask, SIGQUIT); sigaddset(&mask, SIGTSTP); sigprocmask(SIG_BLOCK, &mask, &oldmask); - init_screen(); + if (interactive) + init_screen(); (void) signal(SIGINT, leave); siginterrupt(SIGINT, 1); (void) signal(SIGQUIT, leave); |