Documentation ¶
Index ¶
- Variables
- func Chdir(dir string) error
- func Chroot(dir string) error
- func ClearKeepCaps() error
- func Clone(flags uintptr) (int, error)
- func CloseFdsFrom(minFd int) error
- func Closefd(fd uintptr) error
- func CreateMasterAndConsole() (*os.File, string, error)
- func Dup2(fd1, fd2 uintptr) error
- func Exec(cmd string, args []string, env []string) error
- func Execv(cmd string, args []string, env []string) error
- func Fork() (int, error)
- func GetClockTicks() int
- func GetLastAccess(stat *syscall.Stat_t) syscall.Timespec
- func GetLastModification(stat *syscall.Stat_t) syscall.Timespec
- func GetParentDeathSignal() (int, error)
- func GetProcessStartTime(pid int) (string, error)
- func Gettid() int
- func Ioctl(fd uintptr, flag, data uintptr) error
- func LUtimesNano(path string, ts []syscall.Timespec) error
- func Lgetxattr(path string, attr string) ([]byte, error)
- func Lsetxattr(path string, attr string, data []byte, flags int) error
- func Mkfifo(name string, mode uint32) error
- func Mknod(path string, mode uint32, dev int) error
- func Mount(source, target, fstype string, flags uintptr, data string) error
- func OpenPtmx() (*os.File, error)
- func OpenTerminal(name string, flag int) (*os.File, error)
- func ParentDeathSignal(sig uintptr) error
- func Pivotroot(newroot, putold string) error
- func Prctl(option int, arg2, arg3, arg4, arg5 uintptr) error
- func Ptsname(f *os.File) (string, error)
- func SetCloneFlags(cmd *exec.Cmd, flag uintptr)
- func SetKeepCaps() error
- func Setctty() error
- func Setgid(gid int) error
- func Setgroups(gids []int) error
- func Sethostname(name string) error
- func Setns(fd uintptr, flags uintptr) error
- func Setresgid(rgid, egid, sgid int) error
- func Setresuid(ruid, euid, suid int) error
- func Setsid() (int, error)
- func Setuid(uid int) error
- func Umask(mask int) int
- func Unlockpt(f *os.File) error
- func Unmount(target string, flags int) error
- func Unshare(flags int) error
- func UsetCloseOnExec(fd uintptr) error
- func UtimesNano(path string, ts []syscall.Timespec) error
Constants ¶
This section is empty.
Variables ¶
var (
ErrNotSupportedPlatform = errors.New("platform and architecture is not supported")
)
Functions ¶
func ClearKeepCaps ¶ added in v0.12.0
func ClearKeepCaps() error
func CloseFdsFrom ¶ added in v0.11.0
Works similarly to OpenBSD's "closefrom(2)":
The closefrom() call deletes all descriptors numbered fd and higher from the per-process file descriptor table. It is effectively the same as calling close(2) on each descriptor.
http://www.openbsd.org/cgi-bin/man.cgi?query=closefrom&sektion=2
func CreateMasterAndConsole ¶
CreateMasterAndConsole will open /dev/ptmx on the host and retreive the pts name for use as the pty slave inside the container
func GetClockTicks ¶ added in v0.11.0
func GetClockTicks() int
func GetParentDeathSignal ¶ added in v0.12.0
func GetProcessStartTime ¶ added in v0.10.0
look in /proc to find the process start time so that we can verify that this pid has started after ourself
func OpenTerminal ¶
OpenTerminal is a clone of os.OpenFile without the O_CLOEXEC used to open the pty slave inside the container namespace
func ParentDeathSignal ¶
func SetCloneFlags ¶
func SetKeepCaps ¶ added in v0.12.0
func SetKeepCaps() error
func Sethostname ¶
func Unlockpt ¶
Unlockpt unlocks the slave pseudoterminal device corresponding to the master pseudoterminal referred to by f. Unlockpt should be called before opening the slave side of a pseudoterminal.
func UsetCloseOnExec ¶
Types ¶
This section is empty.