Home | History | Annotate | Download | only in os

Lines Matching defs:Process

16 // Process stores the information about a process created by StartProcess.
17 type Process struct {
20 isdone uint32 // process has been successfully waited on, non zero if true
24 func newProcess(pid int, handle uintptr) *Process {
25 p := &Process{Pid: pid, handle: handle}
26 runtime.SetFinalizer(p, (*Process).Release)
30 func (p *Process) setDone() {
34 func (p *Process) done() bool {
38 // ProcAttr holds the attributes that will be applied to a new process
42 // creating the process.
45 // new process in the form returned by Environ.
48 // Files specifies the open files inherited by the new process. The
52 // to that file being closed when the process starts.
55 // Operating system-specific process creation attributes.
70 // Getpid returns the process id of the caller.
73 // Getppid returns the process id of the caller's parent.
76 // FindProcess looks for a running process by its pid.
78 // The Process it returns can be used to obtain information
79 // about the underlying operating system process.
81 // On Unix systems, FindProcess always succeeds and returns a Process
82 // for the given pid, regardless of whether the process exists.
83 func FindProcess(pid int) (*Process, error) {
87 // StartProcess starts a new process with the program, arguments and attributes
89 // new process, so it normally starts with the program name.
94 // process will inherit the caller's thread state.
100 func StartProcess(name string, argv []string, attr *ProcAttr) (*Process, error) {
105 // Release releases any resources associated with the Process p,
108 func (p *Process) Release() error {
112 // Kill causes the Process to exit immediately.
113 func (p *Process) Kill() error {
117 // Wait waits for the Process to exit, and then returns a
119 // Wait releases any resources associated with the Process.
120 // On most operating systems, the Process must be a child
121 // of the current process or an error will be returned.
122 func (p *Process) Wait() (*ProcessState, error) {
126 // Signal sends a signal to the Process.
128 func (p *Process) Signal(sig Signal) error {
132 // UserTime returns the user CPU time of the exited process and its children.
137 // SystemTime returns the system CPU time of the exited process and its children.
154 // the process. Convert it to the appropriate underlying
161 // the exited process. Convert it to the appropriate underlying