diff options
Diffstat (limited to 'lib/fuse_loop_mt.c')
-rw-r--r-- | lib/fuse_loop_mt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c index 7ae5890..82e3001 100644 --- a/lib/fuse_loop_mt.c +++ b/lib/fuse_loop_mt.c @@ -241,9 +241,11 @@ int fuse_session_loop_mt(struct fuse_session *se) while (!fuse_session_exited(se)) sem_wait(&mt.finish); + pthread_mutex_lock(&mt.lock); for (w = mt.main.next; w != &mt.main; w = w->next) pthread_cancel(w->thread_id); mt.exit = 1; + pthread_mutex_unlock(&mt.lock); while (mt.main.next != &mt.main) fuse_join_worker(&mt, mt.main.next); |