libfuse: fuse_session_loop_mt() shouldn't pause when exiting worker threads
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 2 Feb 2011 11:18:38 +0000 (12:18 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Wed, 2 Feb 2011 11:18:38 +0000 (12:18 +0100)
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

ChangeLog
lib/fuse_loop_mt.c

index 297ac827ba0ba4990797fd9c721fd5346898961b..61716754cdc0130c96889c3a88d7b9b4825dee9e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-02-02  Miklos Szeredi <miklos@szeredi.hu>
+
+       * 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 <miklos@szeredi.hu>
 
        * In case of failure to add to /etc/mtab use same mountpoint for
index a76713b0808d0fac1c3f82ca8b89ccea9a2bbc19..694f98cd56033a018f574bde7d452289edf92467 100644 (file)
@@ -133,8 +133,6 @@ static void *fuse_do_work(void *data)
        }
 
        sem_post(&mt->finish);
-       pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
-       pause();
 
        return NULL;
 }