Chris Lu 4 years ago
parent
commit
90677e1097
  1. 4
      weed/shell/shell_liner.go

4
weed/shell/shell_liner.go

@ -2,6 +2,7 @@ package shell
import ( import (
"fmt" "fmt"
"github.com/chrislusf/seaweedfs/weed/util/grace"
"io" "io"
"os" "os"
"path" "path"
@ -25,6 +26,9 @@ func RunShell(options ShellOptions) {
line = liner.NewLiner() line = liner.NewLiner()
defer line.Close() defer line.Close()
grace.OnInterrupt(func() {
line.Close()
})
line.SetCtrlCAborts(true) line.SetCtrlCAborts(true)

Loading…
Cancel
Save