MCPcopy Create free account
hub / github.com/containerd/cgroups / DeleteSystemd

Method DeleteSystemd

cgroup2/manager.go:1147–1162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1145}
1146
1147func (c *Manager) DeleteSystemd() error {
1148 ctx := context.TODO()
1149 conn, err := systemdDbus.NewWithContext(ctx)
1150 if err != nil {
1151 return err
1152 }
1153 defer conn.Close()
1154 group := systemdUnitFromPath(c.path)
1155 ch := make(chan string)
1156 _, err = conn.StopUnitContext(ctx, group, "replace", ch)
1157 if err != nil {
1158 return err
1159 }
1160 <-ch
1161 return nil
1162}
1163
1164func newSystemdProperty(name string, units interface{}) systemdDbus.Property {
1165 return systemdDbus.Property{

Callers 1

main.goFile · 0.80

Calls 1

systemdUnitFromPathFunction · 0.85

Tested by

no test coverage detected