cryptomator/jfuse

Check return value of fuse_loop

infeo opened this issue · 0 comments

infeo commented

With the method int fuse_loop() a fuse filesystem can be started, such that filesystem events are handled.

It returns an error code, if it fails. But currently, this error code is not used:

try {
var fuseMount = this.mount(args);
executor.submit(() -> fuseLoop(fuseMount)); // TODO keep reference of future and report result
waitForMountingToComplete(mountPoint);
mount.compareAndSet(lock, fuseMount);

Hence, our implementation does not notice premature ends of the loops and waits indefinitely in the method waitForMountingToComplete.

We must check, if fuse_loop is aready finished in the code, before we wait or return.