mirror of https://github.com/docker/docs.git
Merge pull request #7231 from vieux/allow_stack_trace
allow sigquit to display stacktrace in debug mode
This commit is contained in:
commit
7dde97640f
|
@ -94,7 +94,11 @@ func InitServer(job *engine.Job) engine.Status {
|
||||||
}
|
}
|
||||||
job.Logf("Setting up signal traps")
|
job.Logf("Setting up signal traps")
|
||||||
c := make(chan os.Signal, 1)
|
c := make(chan os.Signal, 1)
|
||||||
gosignal.Notify(c, os.Interrupt, syscall.SIGTERM, syscall.SIGQUIT)
|
signals := []os.Signal{os.Interrupt, syscall.SIGTERM}
|
||||||
|
if os.Getenv("DEBUG") == "" {
|
||||||
|
signals = append(signals, syscall.SIGQUIT)
|
||||||
|
}
|
||||||
|
gosignal.Notify(c, signals...)
|
||||||
go func() {
|
go func() {
|
||||||
interruptCount := uint32(0)
|
interruptCount := uint32(0)
|
||||||
for sig := range c {
|
for sig := range c {
|
||||||
|
|
Loading…
Reference in New Issue