Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go-fuse
Commits
956202f0
Commit
956202f0
authored
Aug 11, 2014
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: use Unmount syscall on darwin directly.
parent
829ecdd2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
fuse/mount_darwin.go
fuse/mount_darwin.go
+4
-11
No files found.
fuse/mount_darwin.go
View file @
956202f0
...
...
@@ -110,6 +110,7 @@ import (
"os"
"os/exec"
"path/filepath"
"syscall"
"unsafe"
)
...
...
@@ -133,18 +134,10 @@ func (m mountError) Error() string {
}
func
unmount
(
mountPoint
string
)
error
{
dir
,
_
:=
filepath
.
Split
(
mountPoint
)
proc
,
err
:=
os
.
StartProcess
(
umountBinary
,
[]
string
{
umountBinary
,
mountPoint
},
&
os
.
ProcAttr
{
Dir
:
dir
,
Files
:
[]
*
os
.
File
{
nil
,
nil
,
os
.
Stderr
}})
if
err
!=
nil
{
return
err
}
w
,
err
:=
proc
.
Wait
()
if
!
w
.
Success
()
{
return
fmt
.
Errorf
(
"umount exited with code %v
\n
"
,
w
.
Sys
())
if
err
:=
syscall
.
Unmount
(
mountPoint
,
0
);
err
!=
nil
{
return
fmt
.
Errorf
(
"umount(%q): %v"
,
mountPoint
,
err
)
}
return
err
return
nil
}
var
umountBinary
string
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment