提交 e31f32c6 编写于 作者: D Daniel P. Berrange

Daemonize fuse thread in libvirt_lxc

In some startup failure modes, the fuse thread may get itself
wedged. This will cause the entire libvirt_lxc process to
hang trying to the join the thread. There is no compelling
reason to wait for the thread to exit if the whole process
is exiting, so just daemonize the fuse thread instead.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 83d7e4e4
......@@ -320,7 +320,7 @@ int lxcSetupFuse(virLXCFusePtr *f, virDomainDefPtr def)
goto cleanup1;
}
if (virThreadCreate(&fuse->thread, true, lxcFuseRun,
if (virThreadCreate(&fuse->thread, false, lxcFuseRun,
(void *)fuse) < 0) {
lxcFuseDestroy(fuse);
goto cleanup1;
......@@ -351,8 +351,6 @@ void lxcFreeFuse(virLXCFusePtr *f)
fuse_exit(fuse->fuse);
virMutexUnlock(&fuse->lock);
virThreadJoin(&fuse->thread);
VIR_FREE(fuse->mountpoint);
VIR_FREE(*f);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册