mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct/cg/sd: add renew dbus connection
[@kolyshkin: doc nits, use dbus.ErrClosed and isDbusError] Signed-off-by: Shiming Zhang <wzshiming@foxmail.com> Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
committed by
Kir Kolyshkin
parent
bacfc2c2f9
commit
15fee9899f
@@ -173,6 +173,7 @@ func (m *legacyManager) Apply(pid int) error {
|
||||
properties = append(properties, c.SystemdProps...)
|
||||
|
||||
if err := startUnit(dbusConnection, unitName, properties); err != nil {
|
||||
m.dbus.checkAndReconnect(dbusConnection, err)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -376,6 +377,7 @@ func (m *legacyManager) Set(container *configs.Config) error {
|
||||
}
|
||||
|
||||
if err := dbusConnection.SetUnitProperties(getUnitName(container.Cgroups), true, properties...); err != nil {
|
||||
m.dbus.checkAndReconnect(dbusConnection, err)
|
||||
_ = m.Freeze(targetFreezerState)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user