mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
chroot: let root be cleaned up by kernel
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
b511d1f0ca
commit
70dfea63ba
1 changed files with 0 additions and 7 deletions
|
@ -62,13 +62,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