aboutsummaryrefslogtreecommitdiff
path: root/weed/command/mount_std.go
diff options
context:
space:
mode:
authorwuyuxiang <wuyuxiang@corp.netease.com>2020-04-28 14:10:23 +0800
committerwuyuxiang <wuyuxiang@corp.netease.com>2020-04-28 14:10:23 +0800
commit6850d28d6b99155dca2da8fa8bbf76124f528fa4 (patch)
tree2a6eb0dd50a530dfb72496a69715438c9aa15a44 /weed/command/mount_std.go
parent2a7957b4ca83fdb5232d761074e81dce6b99648f (diff)
downloadseaweedfs-6850d28d6b99155dca2da8fa8bbf76124f528fa4.tar.xz
seaweedfs-6850d28d6b99155dca2da8fa8bbf76124f528fa4.zip
refacotr: 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()
})