Make sure the top command can be used more than once in tincctl's shell.

This commit is contained in:
Guus Sliepen 2012-08-03 14:17:02 +02:00
parent a57db1dfe0
commit e29e0fee88

View file

@ -59,7 +59,6 @@ static bool cumulative = false;
static list_t node_list; static list_t node_list;
static struct timeval now, prev, diff; static struct timeval now, prev, diff;
static int delay = 1000; static int delay = 1000;
static bool running = true;
static bool changed = true; static bool changed = true;
static const char *unit = "bytes"; static const char *unit = "bytes";
static float scale = 1; static float scale = 1;
@ -247,6 +246,7 @@ static void redraw(void) {
void top(int fd) { void top(int fd) {
initscr(); initscr();
timeout(delay); timeout(delay);
bool running = true;
while(running) { while(running) {
update(fd); update(fd);