cmd

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MPL-2.0 Imports: 7 Imported by: 8

Documentation

Overview

Package cmd same as exec module but with reaper.

Index

Constants

View Source
const (
	MaxStderrLen = 4096
)

MaxStderrLen is maximum length of stderr output captured for error message.

Variables

This section is empty.

Functions

func Run

func Run(name string, args ...string) (string, error)

Run executes a command.

func RunContext

func RunContext(ctx context.Context, name string, args ...string) (string, error)

RunContext executes a command with context.

func WithStdin

func WithStdin(ctx context.Context, stdinData io.Reader) context.Context

WithStdin creates a new context from the existing context and sets stdin value.

Types

type ExitError

type ExitError struct {
	Output   []byte
	ExitCode int
}

ExitError wraps any exit error (reaper or exec).

func (*ExitError) Error

func (exitError *ExitError) Error() string

Error implements error interface.

Directories

Path Synopsis
Package proc implements functions handling UNIX processes.
Package proc implements functions handling UNIX processes.
reaper
Package reaper implements zombie process reaper with notifications.
Package reaper implements zombie process reaper with notifications.

Jump to

Keyboard shortcuts

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