Versions in this module Expand all Collapse all v1 v1.1.0 Sep 9, 2026 v1.0.0 Sep 2, 2026 Changes in this version + const DefaultCleanupTimeout + const MaxArgumentBytes + const MaxArguments + const MaxCleanupTimeout + const MaxEnvironment + const MaxEnvironmentBytes + const MaxInputBytes + const MaxOutputBytes + const MaxPathBytes + const MaxTimeout + var ErrCancelled = errors.New("process execution cancelled") + var ErrCleanup = errors.New("process cleanup failed") + var ErrDeadline = errors.New("process execution deadline exceeded") + var ErrExit = errors.New("process exited unsuccessfully") + var ErrInvalid = errors.New("invalid process command") + var ErrOutputLimit = errors.New("process output exceeds its bound") + var ErrOwnership = errors.New("process ownership failed") + var ErrStart = errors.New("process start failed") + var ErrUnsupported = errors.New("process-tree ownership is unsupported") + func DispatchWatchdog([]string) (bool, int) — js/wasm, windows/amd64 + func DispatchWatchdog(arguments []string) (bool, int) — darwin/amd64, linux/amd64 + type Command struct + Arguments []string + CleanupTimeout time.Duration + Directory string + Environment []string + Executable string + Input []byte + StderrLimit int + StdoutLimit int + Timeout time.Duration + type Outcome string + const OutcomeCancelled + const OutcomeCleanupFailure + const OutcomeCompleted + const OutcomeDeadline + const OutcomeExitFailure + const OutcomeInvalid + const OutcomeOutputLimit + const OutcomeOwnershipFailure + const OutcomeStartFailure + const OutcomeUnsupported + type Result struct + ExitCode int + Outcome Outcome + Started bool + Stderr []byte + Stdout []byte + func Run(ctx context.Context, command Command) (Result, error)