10 "github.com/go-check/check"
13 func cleanupExecRoot(c *check.C, execRoot string) {
14 // Cleanup network namespaces in the exec root of this
15 // daemon because this exec root is specific to this
16 // daemon instance and has no chance of getting
17 // cleaned up when a new daemon is instantiated with a
19 netnsPath := filepath.Join(execRoot, "netns")
20 filepath.Walk(netnsPath, func(path string, info os.FileInfo, err error) error {
21 if err := syscall.Unmount(path, syscall.MNT_FORCE); err != nil {
22 c.Logf("unmount of %s failed: %v", path, err)
29 // SignalDaemonDump sends a signal to the daemon to write a dump file
30 func SignalDaemonDump(pid int) {
31 syscall.Kill(pid, syscall.SIGQUIT)
34 func signalDaemonReload(pid int) error {
35 return syscall.Kill(pid, syscall.SIGHUP)