mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
utils: return error message from StartTransientUnit
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -47,11 +47,11 @@ func RunUnderSystemdScope(pid int, slice string, unitName string) error {
|
|||||||
// On errors check if the cgroup already exists, if it does move the process there
|
// On errors check if the cgroup already exists, if it does move the process there
|
||||||
if props, err := conn.GetUnitTypeProperties(unitName, "Scope"); err == nil {
|
if props, err := conn.GetUnitTypeProperties(unitName, "Scope"); err == nil {
|
||||||
if cgroup, ok := props["ControlGroup"].(string); ok && cgroup != "" {
|
if cgroup, ok := props["ControlGroup"].(string); ok && cgroup != "" {
|
||||||
if err := moveUnderCgroup(cgroup, "", []uint32{uint32(pid)}); err != nil {
|
if err := moveUnderCgroup(cgroup, "", []uint32{uint32(pid)}); err == nil {
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
// On errors return the original error message we got from StartTransientUnit.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user