summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2011-02-02 12:18:38 +0100
committerMiklos Szeredi <mszeredi@suse.cz>2013-04-19 10:50:33 +0200
commit3136ee75bee344d292d6817e8391980ee7a28bea (patch)
treedebec74252bbb233fcfcdacb8e562d6806fd7fa5
parentf6c3524f00b432221a0941cc52cacae1d756e577 (diff)
downloadfuse-3136ee75bee344d292d6817e8391980ee7a28bea.tar.gz
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
-rw-r--r--ChangeLog8
-rw-r--r--lib/fuse_loop_mt.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a5c6170..ff215da 100644
--- 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
+
2012-01-25 Miklos Szeredi <miklos@szeredi.hu>
* Released 2.8.7
diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c
index 037bd86..d3c4984 100644
--- a/lib/fuse_loop_mt.c
+++ b/lib/fuse_loop_mt.c
@@ -128,8 +128,6 @@ static void *fuse_do_work(void *data)
}
sem_post(&mt->finish);
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
- pause();
return NULL;
}