From: Stefan Metzmacher Date: Mon, 16 Jul 2018 15:17:59 +0000 (+0200) Subject: pthreadpool: make sure a pthreadpool is marked as stopped in child processes X-Git-Tag: ldb-1.5.0~238 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=26b35cb20c604afa6db19912e3ff43978dbece61;p=thirdparty%2Fsamba.git pthreadpool: make sure a pthreadpool is marked as stopped in child processes Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/lib/pthreadpool/pthreadpool.c b/lib/pthreadpool/pthreadpool.c index 610cfb02f15..528f4cdfd67 100644 --- a/lib/pthreadpool/pthreadpool.c +++ b/lib/pthreadpool/pthreadpool.c @@ -341,6 +341,7 @@ static void pthreadpool_child(void) pool->num_idle = 0; pool->head = 0; pool->num_jobs = 0; + pool->stopped = true; ret = pthread_cond_init(&pool->condvar, NULL); assert(ret == 0);