MCPcopy Create free account
hub / github.com/linuxkit/linuxkit / stopCmd

Function stopCmd

pkg/init/cmd/service/cmd.go:52–62  ·  view source on GitHub ↗
(ctx context.Context, args []string)

Source from the content-addressed store, hash-verified

50}
51
52func stopCmd(ctx context.Context, args []string) {
53 log, service, sock, path, _ := parseCmd(ctx, "stop", args)
54
55 log.Infof("Stopping service: %q", service)
56 id, pid, msg, err := stop(ctx, service, sock, path)
57 if err != nil {
58 log.WithError(err).Fatal(msg)
59 }
60
61 log.Debugf("Stopped %s pid %d", id, pid)
62}
63
64func startCmd(ctx context.Context, args []string) {
65 log, service, sock, path, dumpSpec := parseCmd(ctx, "start", args)

Callers 2

restartCmdFunction · 0.85
mainFunction · 0.85

Calls 2

parseCmdFunction · 0.85
stopFunction · 0.85

Tested by

no test coverage detected