-
Notifications
You must be signed in to change notification settings - Fork 163
Description
Hello,
I'm new to FUSE as well as this crate. So, I'm probably missing something here and I would be thankful if you can just point me to the appropriate documentation or give me insights about whatever is it that I'm missing.
The issue is that unmounting (eg: calling SessionUnmounter.unmount or drop()-ing the BackgroundSession object) internally from the process which has mounted the filesystem seems to leave a dangling transport link on the mount point. How can I have the process clean up after itself properly?
FTR, I know that the dangling transport link can be removed if I called umount/fusermount3 on the mount point... but calling a new system binary just to remove the dangling endpoint seems rather dirty. I am hoping there is some function/method that would also remove the dangling transport endpoint when unmounting the filesystem.
My objective is that I would like to cleanly unmount the filesystem on either user executing umount/fusermount3 or user sending signals (eg: SIGTERM/INT). There doesn't seem to be any "listener" with which the controller program can identify if the filesystem has been unmounted externally. Thus, a thread spawned to handle user signals will stay blocked on a signal since it can't exactly know if the filesystem has been shutdown externally, leaving a dangling process. And, a shutdown triggered via signal leaves dangling transport link.