osutils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2016 License: Apache-2.0, CC-BY-SA-4.0 Imports: 5 Imported by: 0

Documentation

Overview

http://man7.org/linux/man-pages/man2/prctl.2.html

Index

Constants

View Source
const PR_GET_CHILD_SUBREAPER = 37

Return the "child subreaper" setting of the caller, in the location pointed to by (int *) arg2.

View Source
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 GetOpenFds

func GetOpenFds(pid int) (int, error)

GetOpenFds returns the number of open fds for the process provided by pid

func GetSubreaper

func GetSubreaper() (int, error)

GetSubreaper returns the subreaper setting for the calling process

func SetSubreaper

func SetSubreaper(i int) error

SetSubreaper sets the value i as the subreaper setting for the calling process

Types

type Exit

type Exit struct {
	Pid    int
	Status int
}

Exit is the wait4 information from an exited process

func Reap

func Reap() (exits []Exit, err error)

Reap reaps all child processes for the calling process and returns their exit information

Jump to

Keyboard shortcuts

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