mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-16 21:14:31 +00:00
Close files upon stop. Still need to fix bash issues?
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
func TrapSignal(cb func()) {
|
||||
c := make(chan os.Signal, 1)
|
||||
signal.Notify(c, os.Interrupt)
|
||||
signal.Notify(c, os.Kill)
|
||||
go func() {
|
||||
for sig := range c {
|
||||
fmt.Printf("captured %v, exiting...\n", sig)
|
||||
|
||||
Reference in New Issue
Block a user