Skip to content

Commit

Permalink
Update signal_windows.go (#2767)
Browse files Browse the repository at this point in the history
Trap os.interrupt instead of SIGINT and SIGTERM
  • Loading branch information
AndreaLanfranchi authored Oct 4, 2021
1 parent 83555c2 commit ca3dda2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/debug/signal_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ import (

_debug "github.com/ledgerwatch/erigon/common/debug"
"github.com/ledgerwatch/log/v3"
"golang.org/x/sys/windows"
)

func ListenSignals(stack io.Closer) {
sigc := make(chan os.Signal, 1)
signal.Notify(sigc, windows.SIGINT, windows.SIGTERM)
signal.Notify(sigc, os.Interrupt)
_debug.GetSigC(&sigc)
defer signal.Stop(sigc)

Expand Down

0 comments on commit ca3dda2

Please sign in to comment.