mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #7231 from vieux/allow_stack_trace
allow sigquit to display stacktrace in debug mode
This commit is contained in:
commit
7dde97640f
1 changed files with 5 additions and 1 deletions
|
@ -94,7 +94,11 @@ func InitServer(job *engine.Job) engine.Status {
|
|||
}
|
||||
job.Logf("Setting up signal traps")
|
||||
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() {
|
||||
interruptCount := uint32(0)
|
||||
for sig := range c {
|
||||
|
|
Loading…
Reference in a new issue