moby/daemon/debugtrap_unix.go
John Howard b63c92bf24 Windows: Stack dump to file
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-07-21 20:04:47 -07:00

21 lines
293 B
Go

// +build !windows
package daemon
import (
"os"
"os/signal"
"syscall"
psignal "github.com/docker/docker/pkg/signal"
)
func setupDumpStackTrap(_ string) {
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGUSR1)
go func() {
for range c {
psignal.DumpStacks("")
}
}()
}