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

Loading…
Cancel
Save