cr: don't umount rootfs which was not mounted by us

Signed-off-by: Andrey Vagin <avagin@openvz.org>
This commit is contained in:
Andrey Vagin 2015-03-25 15:50:18 +03:00 committed by Michael Crosby
parent f705221b4a
commit b28fbb20a3
1 changed files with 2 additions and 2 deletions

View File

@ -346,9 +346,9 @@ func (c *linuxContainer) Restore(process *Process) error {
if err := syscall.Mount(c.config.Rootfs, c.config.Rootfs, "bind", syscall.MS_BIND|syscall.MS_REC, ""); err != nil {
return err
}
*/
defer syscall.Unmount(c.config.Rootfs, syscall.MNT_DETACH)
defer syscall.Unmount(c.config.Rootfs, syscall.MNT_DETACH)
*/
cmd := exec.Command(c.criuPath, args...)
cmd.Stdin = process.Stdin
cmd.Stdout = process.Stdout