github.com/openflowlabs/storage@v1.12.13/pkg/chrootarchive/chroot_unix.go (about) 1 // +build !windows,!linux 2 3 package chrootarchive 4 5 import "golang.org/x/sys/unix" 6 7 func realChroot(path string) error { 8 if err := unix.Chroot(path); err != nil { 9 return err 10 } 11 return unix.Chdir("/") 12 } 13 14 func chroot(path string) error { 15 return realChroot(path) 16 }