From c61cebec5c538a95cf641984357259dc616e5760 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Wed, 29 Oct 2008 13:54:36 +0100 Subject: [PATCH] multipathd crashes on shutdown And again pthread programming has proven to be difficult. We really should wait for the thread to actually exit before continuing and free up all of its resources. References: 437245 Signed-off-by: Hannes Reinecke --- libmultipath/log_pthread.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libmultipath/log_pthread.c b/libmultipath/log_pthread.c index 5a97db6..9e9aebe 100644 --- a/libmultipath/log_pthread.c +++ b/libmultipath/log_pthread.c @@ -83,6 +83,7 @@ void log_thread_stop (void) pthread_mutex_lock(logq_lock); pthread_cancel(log_thr); pthread_mutex_unlock(logq_lock); + pthread_join(log_thr, NULL); flush_logqueue(); -- 1.5.4.5