CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2025/09/20 09:01:23

Modified files:
        lib/libfuse    : fuse.c fuse_destroy.3 fuse_loop.3 fuse_main.3 
                         fuse_mount.3 fuse_new.3 fuse_ops.c 
                         fuse_private.h 
        sys/miscfs/fuse: fuse_device.c 

Log message:
This patch addresses incompatibilities in the way that FUSE handles
terminating a FUSE session.

The primary change is:

The Linux libfuse implementation of fuse_loop(3) terminates either when
the kernel sends FUSE_DESTROY or, if fuse_set_signal_handlers(3) has
been called, when it catches one of SIGINT, SIGHUP, or SIGTERM.

The OpenBSD implementation behaves similarly when the file system is
unmounted with umount(8). However, it tries to unmount the file system
automatically when one of the above signals is caught. It should
instead just terminate and rely on fuse_unmount(3) being called later by
the FUSE file system daemon as part of its termination.

Additional changes:

- The FUSE file system daemon's destroy handler is the last operation
called after the file system is unmounted. Before, it was incorrectly
being called when FBT_DESTROY is received by fuse_loop(3). The destroy
handler is now called in fuse_destroy(3).

- The file system is no longer unmounted when the device is closed.
fuse_unmount(3) now closes the FUSE device before unmount(2) is called to
prevent deadlocks due to the kernel trying to send FBT_DESTROY when
fuse_loop(3) is no longer active and there listening for messages from
the kernel.

The side effect of this change is that if a FUSE file system daemon
crashes, the FUSE device is automatically closed but the file system is not
unmounted. It must be unmounted manually with umount(8).

- Man page updates to reflect this change and correct a few other minor
errors.

OK claudio@

Reply via email to