aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-02-20 20:33:34 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-02-21 21:23:10 +0800
commit01507d9b9d872aa6dfaf3ad704b8c2b65e378a41 (patch)
tree65867213d25c4703addfff98471c134462e2f20b /cmd/geth
parent5603715c06998ff9ed30eb134c4398ad1439ef48 (diff)
downloadgo-tangerine-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.tar
go-tangerine-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.tar.gz
go-tangerine-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.tar.bz2
go-tangerine-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.tar.lz
go-tangerine-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.tar.xz
go-tangerine-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.tar.zst
go-tangerine-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.zip
cmd, console: support all termination signals
Diffstat (limited to 'cmd/geth')
-rw-r--r--cmd/geth/consolecmd.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/geth/consolecmd.go b/cmd/geth/consolecmd.go
index 9d5cc38a1..7eca4d59f 100644
--- a/cmd/geth/consolecmd.go
+++ b/cmd/geth/consolecmd.go
@@ -22,6 +22,7 @@ import (
"os/signal"
"path/filepath"
"strings"
+ "syscall"
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/console"
@@ -207,7 +208,7 @@ func ephemeralConsole(ctx *cli.Context) error {
}
// Wait for pending callbacks, but stop for Ctrl-C.
abort := make(chan os.Signal, 1)
- signal.Notify(abort, os.Interrupt)
+ signal.Notify(abort, syscall.SIGINT, syscall.SIGTERM)
go func() {
<-abort