process

package
v2.0.0-beta.11 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package process runs bounded external tools without shell interpretation.

Index

Constants

This section is empty.

Variables

View Source
var ErrOutputLimit = errors.New("external tool output exceeded capture limit")

ErrOutputLimit means the captured output is incomplete and must not be parsed as a successful tool response.

Functions

This section is empty.

Types

type Output

type Output struct {
	Stdout string `json:"stdout"`
	Stderr string `json:"stderr"`
}

Output is the trimmed stdout and stderr of a finished tool.

func Capture

func Capture(ctx context.Context, timeout time.Duration, executable string, args ...string) (Output, error)

Capture runs executable with args under timeout. The child gets its own process group so cancellation kills forked helpers too; output is capped at 64 KiB stdout and 16 KiB stderr.

Jump to

Keyboard shortcuts

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