aboutsummaryrefslogtreecommitdiff
path: root/weed/command/mount_std.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2020-04-27 23:59:13 -0700
committerGitHub <noreply@github.com>2020-04-27 23:59:13 -0700
commit47c4a62c5db8564d036cc96c2f4a097494a2567a (patch)
tree2a6eb0dd50a530dfb72496a69715438c9aa15a44 /weed/command/mount_std.go
parent2a7957b4ca83fdb5232d761074e81dce6b99648f (diff)
parent6850d28d6b99155dca2da8fa8bbf76124f528fa4 (diff)
downloadseaweedfs-47c4a62c5db8564d036cc96c2f4a097494a2567a.tar.xz
seaweedfs-47c4a62c5db8564d036cc96c2f4a097494a2567a.zip
Merge pull request #1293 from wyxloading/refactor_signal_handler
refactor: move signal handling and pprof to grace package
Diffstat (limited to 'weed/command/mount_std.go')
-rw-r--r--weed/command/mount_std.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index b1e47809c..2dc9aa196 100644
--- a/weed/command/mount_std.go
+++ b/weed/command/mount_std.go
@@ -19,13 +19,14 @@ import (
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/chrislusf/seaweedfs/weed/security"
"github.com/chrislusf/seaweedfs/weed/util"
+ "github.com/chrislusf/seaweedfs/weed/util/grace"
"github.com/seaweedfs/fuse"
"github.com/seaweedfs/fuse/fs"
)
func runMount(cmd *Command, args []string) bool {
- util.SetupProfiling(*mountCpuProfile, *mountMemProfile)
+ grace.SetupProfiling(*mountCpuProfile, *mountMemProfile)
umask, umaskErr := strconv.ParseUint(*mountOptions.umaskString, 8, 64)
if umaskErr != nil {
@@ -144,7 +145,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
}
defer fuse.Unmount(dir)
- util.OnInterrupt(func() {
+ grace.OnInterrupt(func() {
fuse.Unmount(dir)
c.Close()
})