From 1633fb7b733da818e9723fb15d68610ae329d07a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Thu, 27 Oct 2022 19:21:34 +0800 Subject: [PATCH] a --- server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.c b/server.c index de8a023..977aac8 100644 --- a/server.c +++ b/server.c @@ -582,7 +582,7 @@ static int s5_md5(thread_timer_t *timer) { static void handle_quit(int signo) { uint32_t index = (uint32_t)(pthread_getspecific(pthread_key_index)); - printf("Handle sigquit@%u\n", index); + printf("Handle sigquit@%d\n", index-1); fflush(stdout); signal(SIGQUIT, handle_quit); if(index) longjmp(jmp2convend[index-1], signo); @@ -591,7 +591,7 @@ static void handle_quit(int signo) { static void handle_segv(int signo) { uint32_t index = (uint32_t)(pthread_getspecific(pthread_key_index)); - printf("Handle sigsegv@%u\n", index); + printf("Handle sigsegv@%d\n", index-1); fflush(stdout); signal(SIGSEGV, handle_segv); if(index) longjmp(jmp2convend[index-1], signo); @@ -612,7 +612,7 @@ static void handle_int(int signo) { static void handle_pipe(int signo) { uint32_t index = (uint32_t)(pthread_getspecific(pthread_key_index)); - printf("Pipe error@%u, break loop...\n", index); + printf("Pipe error@%d, break loop...\n", index-1); fflush(stdout); signal(SIGPIPE, handle_pipe); if(index) longjmp(jmp2convend[index-1], signo);