pthreadpool: make sure a pthreadpool is marked as stopped in child processes
authorStefan Metzmacher <metze@samba.org>
Mon, 16 Jul 2018 15:17:59 +0000 (17:17 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 24 Jul 2018 15:38:26 +0000 (17:38 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
lib/pthreadpool/pthreadpool.c

index 610cfb02f154866b8ac7d598680e4d0aeb3b9593..528f4cdfd6786f8d1feaa7a9bb9f1bf914ec7417 100644 (file)
@@ -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);