cgtop: allow user to force looping behavior even in non-TTY mode
This commit is contained in:
+3
-3
@@ -60,7 +60,7 @@ typedef struct Group {
|
||||
} Group;
|
||||
|
||||
static unsigned arg_depth = 3;
|
||||
static unsigned arg_iterations = 0;
|
||||
static unsigned arg_iterations = (unsigned)-1;
|
||||
static bool arg_batch = false;
|
||||
static bool arg_raw = false;
|
||||
static usec_t arg_delay = 1*USEC_PER_SEC;
|
||||
@@ -715,8 +715,8 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
signal(SIGWINCH, columns_lines_cache_reset);
|
||||
|
||||
if (!on_tty())
|
||||
arg_iterations = 1;
|
||||
if (arg_iterations == (unsigned)-1)
|
||||
arg_iterations = on_tty() ? 0 : 1;
|
||||
|
||||
while (!quit) {
|
||||
Hashmap *c;
|
||||
|
||||
Reference in New Issue
Block a user