github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/testutil/daemon/daemon_windows.go (about)

     1  package daemon
     2  
     3  import (
     4  	"fmt"
     5  	"os/exec"
     6  	"strconv"
     7  	"testing"
     8  
     9  	"golang.org/x/sys/windows"
    10  	"gotest.tools/v3/assert"
    11  )
    12  
    13  // SignalDaemonDump sends a signal to the daemon to write a dump file
    14  func SignalDaemonDump(pid int) {
    15  	ev, _ := windows.UTF16PtrFromString("Global\\docker-daemon-" + strconv.Itoa(pid))
    16  	h2, err := windows.OpenEvent(0x0002, false, ev)
    17  	if h2 == 0 || err != nil {
    18  		return
    19  	}
    20  	windows.PulseEvent(h2)
    21  }
    22  
    23  func signalDaemonReload(pid int) error {
    24  	return fmt.Errorf("daemon reload not supported")
    25  }
    26  
    27  func cleanupNetworkNamespace(_ testing.TB, _ *Daemon) {}
    28  
    29  // CgroupNamespace returns the cgroup namespace the daemon is running in
    30  func (d *Daemon) CgroupNamespace(t testing.TB) string {
    31  	assert.Assert(t, false)
    32  	return "cgroup namespaces are not supported on Windows"
    33  }
    34  
    35  func setsid(cmd *exec.Cmd) {
    36  }