I was trying out the Syscall in Go and had created the struct
cmd.SysProcAttr = &syscall.SysProcAttr{
//New UTS Child become 1 Mount Name Space
Cloneflags: syscall.CLONE_NEWUTS | syscall.CLONE_NEWPID | syscall.CLONE_NEWNS,
Unshareflags: syscall.CLONE_NEWNS, //Dont share the container to the host,
}
but I get the error :
unknown syscall.SysProcAttr field 'Unshareflags' in struct literal
From the documentation I understand it does not work in a mac. I tried running it on an Ubuntu VM:
Linux xxx 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22 15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Doesn't work as a sudo user either.