github.com/Heebron/moby@v0.0.0-20221111184709-6eab4f55faf7/libcontainerd/supervisor/remote_daemon_windows.go (about) 1 package supervisor // import "github.com/docker/docker/libcontainerd/supervisor" 2 3 import ( 4 "os" 5 6 "github.com/docker/docker/pkg/process" 7 ) 8 9 const ( 10 grpcPipeName = `\\.\pipe\containerd-containerd` 11 debugPipeName = `\\.\pipe\containerd-debug` 12 ) 13 14 func (r *remote) setDefaults() { 15 if r.GRPC.Address == "" { 16 r.GRPC.Address = grpcPipeName 17 } 18 if r.Debug.Address == "" { 19 r.Debug.Address = debugPipeName 20 } 21 } 22 23 func (r *remote) stopDaemon() { 24 p, err := os.FindProcess(r.daemonPid) 25 if err != nil { 26 r.logger.WithField("pid", r.daemonPid).Warn("could not find daemon process") 27 return 28 } 29 30 if err = p.Kill(); err != nil { 31 r.logger.WithError(err).WithField("pid", r.daemonPid).Warn("could not kill daemon process") 32 return 33 } 34 35 _, err = p.Wait() 36 if err != nil { 37 r.logger.WithError(err).WithField("pid", r.daemonPid).Warn("wait for daemon process") 38 return 39 } 40 } 41 42 func (r *remote) killDaemon() { 43 process.Kill(r.daemonPid) 44 } 45 46 func (r *remote) platformCleanup() { 47 // Nothing to do 48 }