mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-13 12:19:36 +00:00
utils: return error message from StartTransientUnit
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
(cherry picked from commit eea5d25126)
This commit is contained in:
parent
046fa27408
commit
331ce0f7ee
1 changed files with 3 additions and 3 deletions
|
|
@ -47,10 +47,10 @@ func RunUnderSystemdScope(pid int, slice string, unitName string) error {
|
|||
// 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 cgroup, ok := props["ControlGroup"].(string); ok && cgroup != "" {
|
||||
if err := moveUnderCgroup(cgroup, "", []uint32{uint32(pid)}); err != nil {
|
||||
return err
|
||||
if err := moveUnderCgroup(cgroup, "", []uint32{uint32(pid)}); err == nil {
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
// On errors return the original error message we got from StartTransientUnit.
|
||||
}
|
||||
}
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue