From: Miklos Szeredi Date: Wed, 2 Feb 2011 11:18:38 +0000 (+0100) Subject: libfuse: fuse_session_loop_mt() shouldn't pause when exiting worker threads X-Git-Tag: fuse_2_9_0~72 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=71b1c37a66b187404f2099ddbfb0d3912e65b821;p=qemu-gpiodev%2Flibfuse.git libfuse: fuse_session_loop_mt() shouldn't pause when exiting worker threads In fuse_session_loop_mt() don't pause when exiting the worker threads. The pause() was added in 2.2.1 to prevent segfault on pthread_cancel() on an exited, detached thread. Now worker threads are not detached and pthread_cancel() should work fine even after the thread exited. Reported by Boris Protopopov --- diff --git a/ChangeLog b/ChangeLog index 297ac82..6171675 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-02-02 Miklos Szeredi + + * libfuse: In fuse_session_loop_mt() don't pause when exiting the + worker threads. The pause() was added in 2.2.1 to prevent + segfault on pthread_cancel() on an exited, detached thread. Now + worker threads are not detached and pthread_cancel() should work + fine even after the thread exited. Reported by Boris Protopopov + 2011-01-31 Miklos Szeredi * In case of failure to add to /etc/mtab use same mountpoint for diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c index a76713b..694f98c 100644 --- a/lib/fuse_loop_mt.c +++ b/lib/fuse_loop_mt.c @@ -133,8 +133,6 @@ static void *fuse_do_work(void *data) } sem_post(&mt->finish); - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - pause(); return NULL; }