]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
fixup! fixup! show threads: displaying the same thread id's as in log
authorMaria Matejka <mq@ucw.cz>
Thu, 27 Jun 2024 12:19:29 +0000 (14:19 +0200)
committerMaria Matejka <mq@ucw.cz>
Thu, 27 Jun 2024 12:19:29 +0000 (14:19 +0200)
sysdep/unix/io-loop.c

index 16ffbb2bb2db636f17eff0135a524a18ca378ee9..a29a922ffe4bd642074fef23f272f96ee41d0b87 100644 (file)
@@ -1362,6 +1362,9 @@ cmd_show_threads_done(struct bird_thread_syncer *sync)
     UNLOCK_DOMAIN(attrs, group->domain);
   }
 
+  if (!tsd->show_loops)
+    cli_printf(tsd->cli, -1027, "Thread ID       Working         Overhead        Last Pickup/Drop");
+
   for (uint i = 0; i < tsd->line_pos - 1; i++)
     cli_printf(tsd->cli, -1027, "%s", tsd->lines[i]);
 
@@ -1382,9 +1385,6 @@ cmd_show_threads(int show_loops)
   this_cli->cont = bird_thread_show_cli_cont;
   this_cli->cleanup = bird_thread_show_cli_cleanup;
 
-  if (!show_loops)
-    tsd_append("Thread ID       Working         Overhead        Last Pickup/Drop");
-
   bird_thread_sync_all(&tsd->sync, bird_thread_show, cmd_show_threads_done, "Show Threads");
 }