aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Silver <sssilver@gmail.com> 2018-05-03 01:57:38 -0500
committerGravatar Miek Gieben <miek@miek.nl> 2018-05-03 08:57:38 +0200
commit59dbcd32ea7db1581c4be4db6bfbf7dee2c049fe (patch)
tree5581f6bd2237e3e8271fbd8dd6a067cbf604ec4e
parent5735292406caf7d490853cee37f12126a8b7a4dc (diff)
downloadcoredns-59dbcd32ea7db1581c4be4db6bfbf7dee2c049fe.tar.gz
coredns-59dbcd32ea7db1581c4be4db6bfbf7dee2c049fe.tar.zst
coredns-59dbcd32ea7db1581c4be4db6bfbf7dee2c049fe.zip
Signal handling breaks parent code (#1763) (#1764)
-rw-r--r--coremain/run.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/coremain/run.go b/coremain/run.go
index c0e944567..f8f4651e6 100644
--- a/coremain/run.go
+++ b/coremain/run.go
@@ -19,7 +19,6 @@ import (
)
func init() {
- caddy.TrapSignals()
caddy.DefaultConfigFile = "Corefile"
caddy.Quiet = true // don't show init stuff from caddy
setVersion()
@@ -41,6 +40,8 @@ func init() {
// Run is CoreDNS's main() function.
func Run() {
+ caddy.TrapSignals()
+
// Reset flag.CommandLine to get rid of unwanted flags for instance from glog (used in kubernetes).
// And readd the once we want to keep.
flag.VisitAll(func(f *flag.Flag) {