Browse Source

add os.Kill signal to handle.

go fmt some code.
pull/2/head
Chris Lu 11 years ago
parent
commit
029923329d
  1. 1
      go/filer/client_operations.go
  2. 3
      go/weed/mount.go
  3. 2
      go/weed/mount_std.go
  4. 2
      go/weed/server.go
  5. 2
      go/weed/volume.go

1
go/filer/client_operations.go

@ -68,4 +68,3 @@ func call(server string, request ApiRequest, ret interface{}) error {
}
return nil
}

3
go/weed/mount.go

@ -1,7 +1,6 @@
package main
import (
)
import ()
type MountOptions struct {
filer *string

2
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

2
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()

2
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()

Loading…
Cancel
Save