Signal handling breaks parent code (#1763) (#1764)

This commit is contained in:
Silver
2018-05-03 01:57:38 -05:00
committed by Miek Gieben
parent 5735292406
commit 59dbcd32ea

View File

@@ -19,7 +19,6 @@ import (
) )
func init() { func init() {
caddy.TrapSignals()
caddy.DefaultConfigFile = "Corefile" caddy.DefaultConfigFile = "Corefile"
caddy.Quiet = true // don't show init stuff from caddy caddy.Quiet = true // don't show init stuff from caddy
setVersion() setVersion()
@@ -41,6 +40,8 @@ func init() {
// Run is CoreDNS's main() function. // Run is CoreDNS's main() function.
func Run() { func Run() {
caddy.TrapSignals()
// Reset flag.CommandLine to get rid of unwanted flags for instance from glog (used in kubernetes). // Reset flag.CommandLine to get rid of unwanted flags for instance from glog (used in kubernetes).
// And readd the once we want to keep. // And readd the once we want to keep.
flag.VisitAll(func(f *flag.Flag) { flag.VisitAll(func(f *flag.Flag) {