Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for newPIDProcess (0.13 sec)

  1. src/os/exec_plan9.go

    		sysattr.Files = append(sysattr.Files, f.Fd())
    	}
    
    	pid, _, e := syscall.StartProcess(name, argv, sysattr)
    	if e != nil {
    		return nil, &PathError{Op: "fork/exec", Path: name, Err: e}
    	}
    
    	return newPIDProcess(pid), nil
    }
    
    func (p *Process) writeProcFile(file string, data string) error {
    	f, e := OpenFile("/proc/"+itoa.Itoa(p.Pid)+"/"+file, O_WRONLY, 0)
    	if e != nil {
    		return e
    	}
    	defer f.Close()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  2. src/os/exec_posix.go

    	}
    
    	// For Windows, syscall.StartProcess above already returned a process handle.
    	if runtime.GOOS != "windows" {
    		var ok bool
    		h, ok = getPidfd(sysattr.Sys)
    		if !ok {
    			return newPIDProcess(pid), nil
    		}
    	}
    
    	return newHandleProcess(pid, h), nil
    }
    
    func (p *Process) kill() error {
    	return p.Signal(Kill)
    }
    
    // ProcessState stores information about a process, as reported by Wait.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  3. src/os/exec_unix.go

    		return newDoneProcess(pid), nil
    	} else if err != nil {
    		// Ignore other errors from pidfdFind, as the callers
    		// do not expect them. Fall back to using the PID.
    		return newPIDProcess(pid), nil
    	}
    	// Use the handle.
    	return newHandleProcess(pid, h), nil
    }
    
    func (p *ProcessState) userTime() time.Duration {
    	return time.Duration(p.rusage.Utime.Nano()) * time.Nanosecond
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  4. src/os/exec.go

    	// (or during closeHandle), not directly! handle is immutable.
    	//
    	// On Windows, it is a handle from OpenProcess.
    	// On Linux, it is a pidfd.
    	// It is unused on other GOOSes.
    	handle uintptr
    }
    
    func newPIDProcess(pid int) *Process {
    	p := &Process{
    		Pid:  pid,
    		mode: modePID,
    	}
    	runtime.SetFinalizer(p, (*Process).Release)
    	return p
    }
    
    func newHandleProcess(pid int, handle uintptr) *Process {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 12.8K bytes
    - Viewed (0)
Back to top