From 985f52fe34f1186f76a50dca934b580514bb5e51 Mon Sep 17 00:00:00 2001 From: Patrick Caulfield Date: Thu, 23 Sep 2004 12:51:56 +0000 Subject: [PATCH] Make the thread handling a little less cavalier. In particular, calling pthread_exit in a signal handler was a /really/ bad idea. --- daemons/clvmd/clvmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c index 216eb1ea1..8b5e5c833 100644 --- a/daemons/clvmd/clvmd.c +++ b/daemons/clvmd/clvmd.c @@ -1292,7 +1292,8 @@ static void *pre_and_post_thread(void *arg) DEBUGLOG("Got pre command condition...\n"); } DEBUGLOG("Subthread finished\n"); - return (void *) 0; + pthread_exit((void *) 0); + return 0; } /* Process a command on the local node and store the result */ @@ -1681,7 +1682,6 @@ static void ntoh_clvm(struct clvm_header *hdr) static void sigusr2_handler(int sig) { DEBUGLOG("SIGUSR2 received\n"); - pthread_exit((void *) -1); return; } -- 2.43.5