signal: initialize interceptor explictly

This commit is contained in:
Joost Jager
2019-11-12 15:33:48 +01:00
parent 76c2b2cea2
commit 6c6bbdd365
2 changed files with 5 additions and 1 deletions

3
lnd.go
View File

@ -116,6 +116,9 @@ type rpcListeners func() ([]net.Listener, func(), []grpc.ServerOption, error)
// created in the top-level scope of a main method aren't executed if os.Exit()
// is called.
func Main(lisCfg ListenerCfg) error {
// Hook interceptor for os signals.
signal.Intercept()
// Load the configuration, and parse any command line options. This
// function will also set up logging properly.
loadedConfig, err := loadConfig()