Pure-Go process-lifecycle primitives — reap, supervise, respawn. No cgo.
🌐 Website · 📚 Documentation
go-proc is a set of pure-Go (no cgo) primitives for supervising the lifecycle of processes — the small, reusable pieces an init or a workload manager needs: a PID-1 subreaper, a process supervisor, and a restart/reconcile state machine. They were extracted from a microVM init and generalized so they depend on no particular workload model, transport, or scheduler.
Reap orphans. Supervise children. Respawn on your terms.
Each library is CGO-free, dependency-free, 100% test-covered (including error branches), race-tested, and green across the six 64-bit Go targets (amd64, arm64, riscv64, loong64, ppc64le, s390x).
| Repo | What it is |
|---|---|
| supervisor | a PID-1 subreaper (SIGCHLD + Wait4, Linux, with a portable no-op stub elsewhere) and a process supervisor that drives a pluggable Runtime over a Spec of Procs, correlates exits back to the owning process, and restarts per RestartPolicy |
| respawn | a restart / reconcile state machine — grace-period debounce (anti-flap), max_restarts sliding-window anti-thrash, and constant/exponential backoff — a pure Decide core wrapped in a concurrent per-unit Reconciler |
| docs | MkDocs Material documentation, versioned with mike, served at /docs/ |
| go-proc.github.io | the Hugo landing page |
| brand | logos and brand assets |
- Pure Go, zero cgo. Cross-compiles and embeds anywhere; a static binary by
default. Linux-specific syscalls (the subreaper) sit behind build tags with a
portable stub, so
go build/go vetstay green on every OS. - Generic, not weft-shaped. No dependency on any workload schema, gRPC, or
health checker — a
Runtimeinterface, anActionsinterface, and local value types are the only seams. - A pure decision core. Scheduling is a pure function of
(policy, history, signal, now); the concurrency lives in a thin shell around it, so every decision is unit-testable against a fixed clock. - 100% test coverage, including every error branch, is the target — enforced as a CI gate on each library.
Both primitives shipped. supervisor (subreaper + supervisor) and respawn
(restart state machine) are released at 100% coverage, race-tested, gofmt +
go vet clean, CI green across all six 64-bit Go arches.
BSD-3-Clause.
