mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
allow sigquit to display stacktrace in debug mode
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
This commit is contained in:
parent
228c6a374b
commit
5b293f1596
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…
Add table
Reference in a new issue