Also delete winsz fifo

In conmon 2.0.3, we add another fifo to handle window resizing. This needs to be cleaned up for commands like restore, where the same path is used.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
This commit is contained in:
Peter Hunt
2019-11-15 12:44:15 -05:00
parent d7ed9fa188
commit fa415f07a1

View File

@ -652,6 +652,11 @@ func (c *Container) removeConmonFiles() error {
return errors.Wrapf(err, "error removing container %s ctl file", c.ID()) return errors.Wrapf(err, "error removing container %s ctl file", c.ID())
} }
winszFile := filepath.Join(c.bundlePath(), "winsz")
if err := os.Remove(winszFile); err != nil && !os.IsNotExist(err) {
return errors.Wrapf(err, "error removing container %s winsz file", c.ID())
}
oomFile := filepath.Join(c.bundlePath(), "oom") oomFile := filepath.Join(c.bundlePath(), "oom")
if err := os.Remove(oomFile); err != nil && !os.IsNotExist(err) { if err := os.Remove(oomFile); err != nil && !os.IsNotExist(err) {
return errors.Wrapf(err, "error removing container %s OOM file", c.ID()) return errors.Wrapf(err, "error removing container %s OOM file", c.ID())