moby/daemon/debugtrap_unix.go
John Howard f4b08c7f5e Windows: Win32 event for sigusr1 linux equivalence
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-06 18:58:53 -07:00

21 lines
283 B
Go

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