1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/libnetwork/cmd/dnet/dnet_windows.go
Derek McGowan 710e0664c4 Update logrus to v1.0.1
Fix case sensitivity issue
Update docker and runc vendors

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-07 11:20:47 -07:00

28 lines
594 B
Go

package main
import (
"fmt"
"os"
"syscall"
"github.com/docker/docker/pkg/signal"
"github.com/docker/docker/pkg/system"
"github.com/sirupsen/logrus"
)
// Copied over from docker/daemon/debugtrap_windows.go
func setupDumpStackTrap() {
go func() {
sa := syscall.SecurityAttributes{
Length: 0,
}
ev := "Global\\docker-daemon-" + fmt.Sprint(os.Getpid())
if h, _ := system.CreateEvent(&sa, false, false, ev); h != 0 {
logrus.Debugf("Stackdump - waiting signal at %s", ev)
for {
syscall.WaitForSingleObject(h, syscall.INFINITE)
signal.DumpStacks("")
}
}
}()
}