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
Sebastiaan van Stijn f864421ead bump docker/docker to master and unfork dependencies
This patch updates all dependencies to match what is
used in moby/moby. Making the dependencies match
what is used in that repository makes sure we test
with the same version as libnetwork is later built
with in moby.

This also gets rid of some temporary forks that were
needed during the migration of Sirupsen/logrus to
sirupsen/logrus.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-10-25 17:26:25 +02:00

27 lines
596 B
Go

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