aboutsummaryrefslogtreecommitdiffstats
path: root/console
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 /console
parent5603715c06998ff9ed30eb134c4398ad1439ef48 (diff)
downloaddexon-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.tar
dexon-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.tar.gz
dexon-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.tar.bz2
dexon-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.tar.lz
dexon-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.tar.xz
dexon-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.tar.zst
dexon-01507d9b9d872aa6dfaf3ad704b8c2b65e378a41.zip
cmd, console: support all termination signals
Diffstat (limited to 'console')
-rw-r--r--console/console.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/console/console.go b/console/console.go
index 52fe1f542..b280d4e65 100644
--- a/console/console.go
+++ b/console/console.go
@@ -26,6 +26,7 @@ import (
"regexp"
"sort"
"strings"
+ "syscall"
"github.com/ethereum/go-ethereum/internal/jsre"
"github.com/ethereum/go-ethereum/internal/web3ext"
@@ -332,7 +333,7 @@ func (c *Console) Interactive() {
}()
// Monitor Ctrl-C too in case the input is empty and we need to bail
abort := make(chan os.Signal, 1)
- signal.Notify(abort, os.Interrupt)
+ signal.Notify(abort, syscall.SIGINT, syscall.SIGTERM)
// Start sending prompts to the user and reading back inputs
for {