MCPcopy Create free account
hub / github.com/containers/common / systemdDestroyConn

Function systemdDestroyConn

pkg/cgroups/systemd.go:70–80  ·  view source on GitHub ↗

* systemdDestroyConn is copied from containerd/cgroups/systemd.go file, that has the following license: Copyright The containerd Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtai

(path string, c *systemdDbus.Conn)

Source from the content-addressed store, hash-verified

68 limitations under the License.
69*/
70func systemdDestroyConn(path string, c *systemdDbus.Conn) error {
71 name := filepath.Base(path)
72
73 ch := make(chan string)
74 _, err := c.StopUnitContext(context.TODO(), name, "replace", ch)
75 if err != nil {
76 return err
77 }
78 <-ch
79 return nil
80}

Callers 1

DeleteByPathConnMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…