Documentation ¶
Index ¶
- Constants
- func ClearKeepCaps() error
- func Execv(cmd string, args []string, env []string) error
- func GetClockTicks() int
- func GetProcessStartTime(pid int) (string, error)
- func Lgetxattr(path string, attr string) ([]byte, error)
- func Llistxattr(path string, dest []byte) (size int, err error)
- func Lsetxattr(path string, attr string, data []byte, flags int) error
- func Prctl(option int, arg2, arg3, arg4, arg5 uintptr) (err error)
- func Prlimit(pid, resource int, limit syscall.Rlimit) error
- func RunningInUserNS() bool
- func SetKeepCaps() error
- func SetParentDeathSignal(sig uintptr) error
- func SetSubreaper(i int) error
- func Setctty() error
- func Setgid(gid int) (err error)
- func Setns(fd uintptr, flags uintptr) error
- func Setuid(uid int) (err error)
- func SysSetns() uint32
- type ParentDeathSignal
Constants ¶
const PR_SET_CHILD_SUBREAPER = 36
If arg2 is nonzero, set the "child subreaper" attribute of the calling process; if arg2 is zero, unset the attribute. When a process is marked as a child subreaper, all of the children that it creates, and their descendants, will be marked as having a subreaper. In effect, a subreaper fulfills the role of init(1) for its descendant processes. Upon termination of a process that is orphaned (i.e., its immediate parent has already terminated) and marked as having a subreaper, the nearest still living ancestor subreaper will receive a SIGCHLD signal and be able to wait(2) on the process to discover its termination status.
Variables ¶
This section is empty.
Functions ¶
func ClearKeepCaps ¶
func ClearKeepCaps() error
func GetClockTicks ¶
func GetClockTicks() int
func GetProcessStartTime ¶
look in /proc to find the process start time so that we can verify that this pid has started after ourself
func Lgetxattr ¶
Returns a []byte slice if the xattr is set and nil otherwise Requires path and its attribute as arguments
func Llistxattr ¶
Returns the size of xattrs and nil error Requires path, takes allocated []byte or nil as last argument
func RunningInUserNS ¶ added in v0.0.7
func RunningInUserNS() bool
RunningInUserNS detects whether we are currently running in a user namespace. Copied from github.com/lxc/lxd/shared/util.go
func SetKeepCaps ¶
func SetKeepCaps() error
func SetParentDeathSignal ¶
func SetSubreaper ¶ added in v0.1.0
SetSubreaper sets the value i as the subreaper setting for the calling process
Types ¶
type ParentDeathSignal ¶
type ParentDeathSignal int
func GetParentDeathSignal ¶
func GetParentDeathSignal() (ParentDeathSignal, error)
func (ParentDeathSignal) Restore ¶
func (p ParentDeathSignal) Restore() error
func (ParentDeathSignal) Set ¶
func (p ParentDeathSignal) Set() error