Hi gophers, I'm back again with a few questions.
Because the CLONE_NEWPID flag is unavailabe when using syscall.Unshare() I am left wondering how I could make a call to SYS_CLONE under Linux.
Maybe it's trivial but I can't seem to wrap my head around it. There is RawSyscall and RawSyscall6 that I might use but I don't know which-one to use. And then if the call is successful, will Go work properly once "cloned" so that I can further make calls to syscall.Setsid, syscall.Chroot and finally syscall.Exec ?
Finally, in go's src/pkg/syscall/exec_linux.go forkAndExecInChild
implementation, all calls seem to avoid the library implementations and go trough RawSyscalls. It left me wondering if this was because we are left in a special mode after fork (maybe related to GC) or if it's just a bootstrap workaround ?
Cheers,
Jonas