lkl tools: lklfuse: initialize lkl after going in the background

This fixes an issue where fuse blocks every filesystem request is
lklfuse is not started in the background.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
This commit is contained in:
Octavian Purdila
2015-11-17 23:51:25 +02:00
parent 8ebe11e77f
commit 407679a460

View File

@@ -595,10 +595,6 @@ int main(int argc, char **argv)
goto out_free; goto out_free;
} }
ret = init_lkl();
if (ret)
goto out_free;
ch = fuse_mount(mnt, &args); ch = fuse_mount(mnt, &args);
if (!ch) { if (!ch) {
ret = -1; ret = -1;
@@ -617,11 +613,16 @@ int main(int argc, char **argv)
goto out_fuse_destroy; goto out_fuse_destroy;
} }
ret = init_lkl();
if (ret)
goto out_remove_signals;
if (mt) if (mt)
ret = fuse_loop_mt(fuse); ret = fuse_loop_mt(fuse);
else else
ret = fuse_loop(fuse); ret = fuse_loop(fuse);
out_remove_signals:
fuse_remove_signal_handlers(fuse_get_session(fuse)); fuse_remove_signal_handlers(fuse_get_session(fuse));
out_fuse_destroy: out_fuse_destroy: