diff options
| author | Chris Lu <chris.lu@gmail.com> | 2014-05-13 11:32:10 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2014-05-13 11:32:10 -0700 |
| commit | 029923329da27791566e6c5b13a013b015dda252 (patch) | |
| tree | e56b38614e472d3e679e7a0a5a7b1c9b07476020 | |
| parent | dc24bad791743c6e1c96602b3678dde4954f795a (diff) | |
| download | seaweedfs-029923329da27791566e6c5b13a013b015dda252.tar.xz seaweedfs-029923329da27791566e6c5b13a013b015dda252.zip | |
add os.Kill signal to handle.
go fmt some code.
| -rw-r--r-- | go/filer/client_operations.go | 1 | ||||
| -rw-r--r-- | go/weed/mount.go | 3 | ||||
| -rw-r--r-- | go/weed/mount_std.go | 2 | ||||
| -rw-r--r-- | go/weed/server.go | 2 | ||||
| -rw-r--r-- | go/weed/volume.go | 2 |
5 files changed, 4 insertions, 6 deletions
diff --git a/go/filer/client_operations.go b/go/filer/client_operations.go index 2eb5c399d..b8a4dca53 100644 --- a/go/filer/client_operations.go +++ b/go/filer/client_operations.go @@ -68,4 +68,3 @@ func call(server string, request ApiRequest, ret interface{}) error { } return nil } - diff --git a/go/weed/mount.go b/go/weed/mount.go index 23f85f567..0290e0f53 100644 --- a/go/weed/mount.go +++ b/go/weed/mount.go @@ -1,7 +1,6 @@ package main -import ( -) +import () type MountOptions struct { filer *string diff --git a/go/weed/mount_std.go b/go/weed/mount_std.go index 5d01a0f87..35ca4011d 100644 --- a/go/weed/mount_std.go +++ b/go/weed/mount_std.go @@ -29,7 +29,7 @@ func runMount(cmd *Command, args []string) bool { } signalChan := make(chan os.Signal, 1) - signal.Notify(signalChan, os.Interrupt) + signal.Notify(signalChan, os.Interrupt, os.Kill) go func() { for _ = range signalChan { // sig is a ^C, handle it diff --git a/go/weed/server.go b/go/weed/server.go index a62291bd0..7684dcbde 100644 --- a/go/weed/server.go +++ b/go/weed/server.go @@ -220,7 +220,7 @@ func runServer(cmd *Command, args []string) bool { // deal with control+c signalChan := make(chan os.Signal, 1) - signal.Notify(signalChan, os.Interrupt) + signal.Notify(signalChan, os.Interrupt, os.Kill) go func() { for _ = range signalChan { volumeServer.Shutdown() diff --git a/go/weed/volume.go b/go/weed/volume.go index 1885afd79..5afa8eea5 100644 --- a/go/weed/volume.go +++ b/go/weed/volume.go @@ -94,7 +94,7 @@ func runVolume(cmd *Command, args []string) bool { // deal with control+c signalChan := make(chan os.Signal, 1) - signal.Notify(signalChan, os.Interrupt) + signal.Notify(signalChan, os.Interrupt, os.Kill) go func() { for _ = range signalChan { volumeServer.Shutdown() |
