process

package
v64.2.6 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package process provides a mechanism for running processes under a different user account to the current process

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	*exec.Cmd
	// contains filtered or unexported fields
}

func (*Command) DirectOutput

func (c *Command) DirectOutput(writer io.Writer)

func (*Command) Execute

func (c *Command) Execute() (r *Result)

func (*Command) String

func (c *Command) String() string

type Result

type Result struct {
	SystemError error
	ExitError   *exec.ExitError
	Duration    time.Duration
	Aborted     bool
	KernelTime  time.Duration
	UserTime    time.Duration
}

func (*Result) ExitCode

func (r *Result) ExitCode() int

ExitCode returns the exit code, or

-1 if the process has not exited
-2 if the process crashed
-3 it could not be established what happened
-4 if process was aborted

func (*Result) String

func (r *Result) String() string

func (*Result) Succeeded

func (r *Result) Succeeded() bool

func (*Result) Verdict

func (r *Result) Verdict() string

Jump to

Keyboard shortcuts

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