unmountFUSE attempts to unmount using fusermount/fusermount3 helper binary. For FUSE mounts, using these helper binaries is preferred, see: https://github.com/containerd/containerd/pull/3765#discussion_r342083514
(target string)
| 38 | // For FUSE mounts, using these helper binaries is preferred, see: |
| 39 | // https://github.com/containerd/containerd/pull/3765#discussion_r342083514 |
| 40 | func unmountFUSE(target string) error { |
| 41 | var err error |
| 42 | for _, helperBinary := range []string{"fusermount3", "fusermount"} { |
| 43 | cmd := exec.Command(helperBinary, "-u", target) |
| 44 | err = cmd.Run() |
| 45 | if err == nil { |
| 46 | return nil |
| 47 | } |
| 48 | } |
| 49 | return err |
| 50 | } |