MCPcopy Index your code
hub / github.com/containerd/containerd / Execute

Method Execute

cmd/containerd/command/service_windows.go:307–329  ·  view source on GitHub ↗
(_ []string, r <-chan svc.ChangeRequest, s chan<- svc.Status)

Source from the content-addressed store, hash-verified

305}
306
307func (h *handler) Execute(_ []string, r <-chan svc.ChangeRequest, s chan<- svc.Status) (bool, uint32) {
308 s <- svc.Status{State: svc.StartPending, Accepts: 0}
309 // Unblock launchService()
310 h.fromsvc <- nil
311
312 s <- svc.Status{State: svc.Running, Accepts: svc.AcceptStop | svc.AcceptShutdown | svc.Accepted(windows.SERVICE_ACCEPT_PARAMCHANGE)}
313
314Loop:
315 for c := range r {
316 switch c.Cmd {
317 case svc.Interrogate:
318 s <- c.CurrentStatus
319 case svc.Stop, svc.Shutdown:
320 s <- svc.Status{State: svc.StopPending, Accepts: 0}
321 h.s.Stop()
322 break Loop
323 }
324 }
325
326 removePanicFile()
327 close(h.done)
328 return false, 0
329}
330
331func initPanicFile(path string) error {
332 var err error

Callers 6

generateFunction · 0.80
formatStringFunction · 0.80
TestBinDirVerifyImageFunction · 0.80
writeCNIConfigFileFunction · 0.80
resolveOverlayValueFunction · 0.80
renderFunction · 0.80

Calls 2

removePanicFileFunction · 0.85
StopMethod · 0.65

Tested by 1

TestBinDirVerifyImageFunction · 0.64