From d17da46055903a517274b7823d41fdd866f48d8d Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 21 Mar 2005 11:47:04 +0000 Subject: Merge 2_2_bugfix up to 2_2_merge1 --- lib/fuse_mt.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/fuse_mt.c') diff --git a/lib/fuse_mt.c b/lib/fuse_mt.c index 2e43671..819a2b9 100644 --- a/lib/fuse_mt.c +++ b/lib/fuse_mt.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -36,6 +37,7 @@ static void *do_work(void *data) struct fuse_worker *w = (struct fuse_worker *) data; struct fuse *f = w->f; struct fuse_context *ctx; + int is_mainthread = (f->numworker == 1); ctx = (struct fuse_context *) malloc(sizeof(struct fuse_context)); if (ctx == NULL) { @@ -83,6 +85,10 @@ static void *do_work(void *data) w->proc(w->f, cmd, w->data); } + /* Wait for cancellation */ + if (!is_mainthread) + pause(); + return NULL; } -- cgit v1.2.3