cr: don't umount rootfs which was not mounted by us
Signed-off-by: Andrey Vagin <avagin@openvz.org>
This commit is contained in:
parent
f705221b4a
commit
b28fbb20a3
|
@ -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 {
|
if err := syscall.Mount(c.config.Rootfs, c.config.Rootfs, "bind", syscall.MS_BIND|syscall.MS_REC, ""); err != nil {
|
||||||
return err
|
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 := exec.Command(c.criuPath, args...)
|
||||||
cmd.Stdin = process.Stdin
|
cmd.Stdin = process.Stdin
|
||||||
cmd.Stdout = process.Stdout
|
cmd.Stdout = process.Stdout
|
||||||
|
|
Loading…
Reference in New Issue