Documentation ¶
Index ¶
- func Cat(path string) (string, error)
- func FormatCommand(command string, args []string) string
- func GetPgid(pid int) (int, error)
- func Run(l logger.Logger, command string, arg ...string) (string, error)
- func SignalString(s syscall.Signal) string
- func StartPTY(c *exec.Cmd) (*os.File, error)
- type Buffer
- type Config
- type Prefixer
- type Process
- func (p *Process) Done() <-chan struct{}
- func (p *Process) Interrupt() error
- func (p *Process) Pid() int
- func (p *Process) Run() error
- func (p *Process) Started() <-chan struct{}
- func (p *Process) Terminate() error
- func (p *Process) WaitResult() error
- func (p *Process) WaitStatus() syscall.WaitStatus
- type Scanner
- type Signal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatCommand ¶
FormatCommand formats a command amd arguments for human reading
func SignalString ¶ added in v3.21.0
SignalString returns the name of the given signal. e.g. SignalString(syscall.Signal(15)) // "SIGTERM"
Types ¶
type Config ¶
type Config struct { PTY bool Timestamp bool Path string Args []string Env []string Stdout io.Writer Stderr io.Writer Dir string Context context.Context InterruptSignal Signal }
Configuration for a Process
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
Process is an operating system level process
func (*Process) Done ¶
func (p *Process) Done() <-chan struct{}
Done returns a channel that is closed when the process finishes
func (*Process) Started ¶
func (p *Process) Started() <-chan struct{}
Started returns a channel that is closed when the process is started
func (*Process) WaitResult ¶
WaitResult returns the raw error returned by Wait()
func (*Process) WaitStatus ¶
func (p *Process) WaitStatus() syscall.WaitStatus
WaitStatus returns the status of the Wait() call
Click to show internal directories.
Click to hide internal directories.