diff options
Diffstat (limited to 'lib/fuse_loop_mt.c')
-rw-r--r-- | lib/fuse_loop_mt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c index c458d1e..05935d5 100644 --- a/lib/fuse_loop_mt.c +++ b/lib/fuse_loop_mt.c @@ -70,7 +70,11 @@ static void *fuse_do_work(void *data) while (!fuse_session_exited(mt->se)) { int isforget = 0; struct fuse_chan *ch = mt->prevch; - int res = fuse_chan_recv(&ch, w->buf, w->bufsize); + int res; + + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + res = fuse_chan_recv(&ch, w->buf, w->bufsize); + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); if (res == -EINTR) continue; if (res <= 0) { @@ -124,6 +128,7 @@ static void *fuse_do_work(void *data) } sem_post(&mt->finish); + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); pause(); return NULL; |