winfsp / cgofuse

Cross-platform FUSE library for Go - Works on Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD
https://winfsp.dev
MIT License
514 stars 82 forks source link

host.Unmount doesn't actually unmount #7

Closed ncw closed 7 years ago

ncw commented 7 years ago

From host.go

// Mount unmounts a file system.
func (host *FileSystemHost) Unmount() {
    if nil != host.fuse {
        C.fuse_exit(host.fuse)
    }
}

However according to the fuse docs fuse_exit just stops the event loop, it doesn't do an unmount.

So this method should probably be renamed "Stop" or something like that.

An Unmount method would be really useful though. Here is how bazil/fuse does it for linux and everyone else. I'm guessing a different procedure would be needed for Windows.

ncw commented 7 years ago

Just realised that this is very much related to #6!

billziss-gh commented 7 years ago

As you mention this is a duplicate of #6. So let's continue this discussion there.

Thanks for the bazil/fuse links. They could prove useful.