Running the fuse daemon in the foreground (ie: not as a daemon)

47 views
Skip to first unread message

Barry Leslie

unread,
Sep 27, 2019, 3:56:34 AM9/27/19
to OSXFUSE
Hi,

I have implemented a file system using OSXFUSE that runs as a daemon along side an app which provides the content for the file system. Currently they communicate through a pipe.

For performance reasons I would like to pull the daemon into the app itself so that fuse_main() would  just be called from a thread in the app with the '-f' option so that it would run in the foreground.

So far I have not been able to get this to work and I was wondering if what I am trying to do is possible.

If it is possible to do this is the host app allowed to make file system calls into its own file system?

From what I see in the debugger and where things seem to be stuck I suspect there are problems if the hosting app makes calls into its own file system. I can probably live with this because another optimization I plan on doing is to have the host app recognize when it is accessing files in its own file system and send the request to a separate api I will provide for internal access.

Thanks in advance for any clarification/advice anyone can give me.





Barry Leslie

unread,
Oct 14, 2019, 8:05:28 AM10/14/19
to OSXFUSE
This seems to be working OK with the one minor issue that it doesn't like to unmount itself.

For example system("umount -f /Volumes/foobar") will tell you the file system doesn't exist. The solution was to spawn off a separate process to do the unmount.
Reply all
Reply to author
Forward
0 new messages