• Chris Marget's avatar
    Removed UID test and syscall-based unmount. · 95c63709
    Chris Marget authored
    On a Linux system with go-fuse program running as root, the mount is
    performed by calling /bin/fusermount, and the unmount is performed with
    syscall.Unmount()
    
    This creates a problem on systems (CentOS 6) with a static-but-edited-by-mount
    /etc/mtab file.
    
     - fusermount adds a line to mtab when the go-fuse program starts
     - syscall.Unmount() doesn't edit the file on program exit
     - subsequent invocations of the program fail to mount with:
    
        "Mount fail: fusermount exited with code 256"
    
    Deleting the now-inaccurate mtab entry clears things up.
    
    There's probably a workaround by adding "-n" option so that mount doesn't
    edit mtab in the first place, but it's not obvious where to insert that when
    starting with the hello.go example.
    95c63709
mount_linux.go 3.29 KB