Versions in this module Expand all Collapse all v0 v0.1.2 May 31, 2026 v0.1.1 May 31, 2026 v0.1.0 May 31, 2026 Changes in this version + var ErrProcessNotFound = errors.New("proctree: process not found") + func Alive(pid int) bool — darwin/amd64, linux/amd64, windows/amd64 + func Children(pid int) ([]int, error) + func Cmdline(pid int) ([]string, error) + func CreateTime(pid int) (time.Time, error) + func Descendants(root int) ([]int, error) + func KillTree(cmd *exec.Cmd) + func KillTreeByPID(pid int) error — darwin/amd64, linux/amd64, windows/amd64 + func NewCommand(spec *Spec) *exec.Cmd + func NewCommandContext(ctx context.Context, spec *Spec) *exec.Cmd + func Start(cmd *exec.Cmd) error + func TeeLine(w io.Writer, fn func(line string)) func(string) + func VerifyOwned(pid int, spec *Spec) bool + func VerifyOwnership(pid int, own *Ownership) bool + func VerifyOwnershipOpts(pid int, own *Ownership, opts *VerifyOptions) bool + func WaitNotAlive(pid int, timeout time.Duration) bool + type CmdlineMatcher func(parts []string) bool + type Options struct + OnLine func(stream Stream, line string) + OnStart func(pid int) + OnStderr func(line string) + OnStdout func(line string) + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + func TeeOptions(stdoutW, stderrW io.Writer, onStdout, onStderr func(line string)) *Options + type Ownership struct + Match CmdlineMatcher + Spec Spec + StartedAt time.Time + type ProcessInfo struct + Cmdline []string + CreateTime time.Time + MemoryRSS uint64 + Name string + OpenFiles int + PGID int + PID int + PPID int + Status string + func Inspect(pid int) (ProcessInfo, error) + func InspectTree(root int) ([]ProcessInfo, error) + type ReconcileOutcome int + const ReconcileKilled + const ReconcileNotRunning + const ReconcileUnverified + type ReconcileResult struct + Outcome ReconcileOutcome + func ReconcilePID(pid int, own *Ownership) ReconcileResult + func ReconcilePIDOpts(pid int, own *Ownership, opts *VerifyOptions) ReconcileResult + type Result struct + Canceled bool + ExitCode int + PID int + StartedAt time.Time + TimedOut bool + func Run(ctx context.Context, spec *Spec, opts *Options) (Result, error) + type Spec struct + Args []string + Dir string + Env []string + Path string + Shell string + type Stream int + const Stderr + const Stdout + type VerifyOptions struct + Match CmdlineMatcher + MaxClockSkew time.Duration + MaxStartLead time.Duration + SkipProcessGroup bool + func DefaultVerifyOptions() VerifyOptions