chroot: let root be cleaned up by kernel
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 70dfea63ba
)
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
3b9269760c
commit
3f21a28ec0
1 changed files with 0 additions and 7 deletions
|
@ -52,13 +52,6 @@ func chroot(path string) (err error) {
|
|||
err = errCleanup
|
||||
}
|
||||
}
|
||||
|
||||
if errCleanup := syscall.Unmount("/", syscall.MNT_DETACH); errCleanup != nil {
|
||||
if err == nil {
|
||||
err = fmt.Errorf("error unmounting root: %v", errCleanup)
|
||||
}
|
||||
return
|
||||
}
|
||||
}()
|
||||
|
||||
if err := syscall.PivotRoot(path, pivotDir); err != nil {
|
||||
|
|
Loading…
Reference in a new issue