Improve general quality of libcontainer
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
This commit is contained in:
parent
593219d191
commit
a304eab9d4
12 changed files with 159 additions and 238 deletions
13
system/setns_linux.go
Normal file
13
system/setns_linux.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
package system
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func Setns(fd uintptr, flags uintptr) error {
|
||||
_, _, err := syscall.RawSyscall(SYS_SETNS, fd, flags, 0)
|
||||
if err != 0 {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue