]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: debug: make ha_panic() report threads starting at 1
authorWilly Tarreau <w@1wt.eu>
Mon, 20 May 2019 15:45:35 +0000 (17:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 20 May 2019 15:46:14 +0000 (17:46 +0200)
Internally they start at zero but everywhere (config, dumps) we show
them starting at 1, so let's fix the confusion.

src/debug.c

index b4fcb65391cf04a77d18891d29d9b48d8a9aa859..ecb55f59077632ee4a40bf345239bd3785396104 100644 (file)
@@ -141,7 +141,7 @@ static int cli_io_handler_show_threads(struct appctx *appctx)
 void ha_panic()
 {
        chunk_reset(&trash);
-       chunk_appendf(&trash, "Thread %u is about to kill the process.\n", tid);
+       chunk_appendf(&trash, "Thread %u is about to kill the process.\n", tid + 1);
        ha_thread_dump_all_to_trash();
        write(2, trash.area, trash.data);
        for (;;)