system

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2014 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotSupportedPlatform = errors.New("platform and architecture is not supported")
)

Functions

func Chdir

func Chdir(dir string) error

func Chroot

func Chroot(dir string) error

func Clone

func Clone(flags uintptr) (int, error)

func Closefd

func Closefd(fd uintptr) error

func CreateMasterAndConsole

func CreateMasterAndConsole() (*os.File, string, error)

CreateMasterAndConsole will open /dev/ptmx on the host and retreive the pts name for use as the pty slave inside the container

func Dup2

func Dup2(fd1, fd2 uintptr) error

func Exec

func Exec(cmd string, args []string, env []string) error

func Execv

func Execv(cmd string, args []string, env []string) error

func Fork

func Fork() (int, error)

func GetLastAccess

func GetLastAccess(stat *syscall.Stat_t) syscall.Timespec

func GetLastModification

func GetLastModification(stat *syscall.Stat_t) syscall.Timespec

func GetProcessStartTime added in v0.10.0

func GetProcessStartTime(pid int) (string, error)

look in /proc to find the process start time so that we can verify that this pid has started after ourself

func Gettid added in v0.10.0

func Gettid() int

func Ioctl

func Ioctl(fd uintptr, flag, data uintptr) error

func LUtimesNano

func LUtimesNano(path string, ts []syscall.Timespec) error

func Lgetxattr

func Lgetxattr(path string, attr string) ([]byte, error)

Returns a nil slice and nil error if the xattr is not set

func Lsetxattr

func Lsetxattr(path string, attr string, data []byte, flags int) error

func Mkfifo

func Mkfifo(name string, mode uint32) error

func Mknod

func Mknod(path string, mode uint32, dev int) error

func Mount

func Mount(source, target, fstype string, flags uintptr, data string) error

func OpenPtmx

func OpenPtmx() (*os.File, error)

OpenPtmx opens /dev/ptmx, i.e. the PTY master.

func OpenTerminal

func OpenTerminal(name string, flag int) (*os.File, error)

OpenTerminal is a clone of os.OpenFile without the O_CLOEXEC used to open the pty slave inside the container namespace

func ParentDeathSignal

func ParentDeathSignal(sig uintptr) error

func Pivotroot

func Pivotroot(newroot, putold string) error

func Ptsname

func Ptsname(f *os.File) (string, error)

Ptsname retrieves the name of the first available pts for the given master.

func SetCloneFlags

func SetCloneFlags(cmd *exec.Cmd, flag uintptr)

func Setctty

func Setctty() error

func Setgid

func Setgid(gid int) error

func Setgroups

func Setgroups(gids []int) error

func Sethostname

func Sethostname(name string) error

func Setns

func Setns(fd uintptr, flags uintptr) error

func Setresgid

func Setresgid(rgid, egid, sgid int) error

func Setresuid

func Setresuid(ruid, euid, suid int) error

func Setsid

func Setsid() (int, error)

func Setuid

func Setuid(uid int) error

func Umask

func Umask(mask int) int

func Unlockpt

func Unlockpt(f *os.File) error

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 Unmount

func Unmount(target string, flags int) error

func Unshare

func Unshare(flags int) error

func UsetCloseOnExec

func UsetCloseOnExec(fd uintptr) error

func UtimesNano

func UtimesNano(path string, ts []syscall.Timespec) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL