mirror of
https://github.com/containers/podman.git
synced 2025-05-17 23:26:08 +08:00
utils: skip empty lines
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -183,6 +183,9 @@ func moveUnderCgroup(cgroup, subtree string, processes []uint32) error {
|
||||
return err
|
||||
}
|
||||
for _, pid := range bytes.Split(processesData, []byte("\n")) {
|
||||
if len(pid) == 0 {
|
||||
continue
|
||||
}
|
||||
if _, err := f.Write(pid); err != nil {
|
||||
logrus.Warnf("Cannot move process %s to cgroup %q", string(pid), newCgroup)
|
||||
}
|
||||
|
Reference in New Issue
Block a user