Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Coverage Ledger — Go: Language Semantics, Standard Library, Process APIs, and Subprocesses (G4 schema)

Chapter: ./go.md — Section G, process runtime. This ledger inventories every documented API and behavior claim in the chapter as one row each, ordered by chapter section (§1 syntax/semantics behavior rows first, then §2–§6 API/behavior rows in order of first appearance).

Scope. Go 1.27.2, the current stable release per the official download feed go.dev/dl/?mode=json (top entry go1.27.2, "stable": true). Every signature was verified verbatim against the doc comments rendered on pkg.go.dev for go1.27.2 — fetched for this ledger from the source tree at tag go1.27.2 (github.com/golang/go; pkg.go.dev/runtime and pkg.go.dev/syscall were also fetched directly) — at retrieval 2026-10-13. The language layer is go.dev/ref/spec (fetched 2026-10-13). Version deltas cite the official release notes (go1.14/1.16/1.18/1.20/1.21/ 1.22/1.25) and go.dev/doc/gc-guide. Platform layer: Linux primary (linux/amd64); Windows deltas labeled per row. Numeric facts existing only in the implementation are cited to the Go source file and are labeled [runtime implementation] in the chapter. No source was unreachable at retrieval time — there are no source-limited rows.

Status definitions.

  • documented — the claim is documented in ./go.md and anchored to a fetched authoritative source (pkg.go.dev doc comment / Go language spec / release note / Go source file at go1.27.2) exactly as the chapter cites it.
  • source-limited — documented but primary wording unreachable at retrieval time. Unused here (Source-limited: 0).
  • not-started / researched — defined by the repo ledger convention; unused in this ledger.

Rollup: Inventoried: 80 / Documented: 80 / Remaining: 0 / Source-limited: 0

Section layout: §1 → PL-GO-001–011 · §2 → PL-GO-012–048 · §3 → PL-GO-049–055 · §4 → PL-GO-056–062 · §5 → PL-GO-063–074 · §6 → PL-GO-075–080.

IDLanguage/API or behaviorCanonical signatureDocumentation pathAuthoritative referenceVersion/platform scopeStatus
PL-GO-001Program execution terminates when main returns; no wait for other goroutines—./go.md §1.4, §3.4go.dev/ref/spec, Program execution[language spec], all platformsdocumented
PL-GO-002go statement: function/args evaluated in calling goroutine, runs in new goroutine, return values discarded—./go.md §1.4go.dev/ref/spec, Go statements[language spec]documented
PL-GO-003Defer: LIFO, function value + arguments evaluated at defer time, defers run at function return (loop example 3 2 1 0)—./go.md §1.3go.dev/ref/spec, Defer statements[language spec]documented
PL-GO-004Defer can access/modify named result parameters (spec example f() returns 42)—./go.md §1.3go.dev/ref/spec, Defer statements[language spec]documented
PL-GO-005Panicking sequence: defers unwind to top of the panicking goroutine, then program terminates—./go.md §1.2, §3.6go.dev/ref/spec, Handling panics[language spec]documented
PL-GO-006Recover works only when called directly by a deferred function of the panicking goroutine; panic(nil) → run-time panic; cross-goroutine recovery impossible—./go.md §1.2go.dev/ref/spec, Handling panics[language spec]documented
PL-GO-007Unrecovered panic prints stack trace (stderr) and exits with code 2; GOTRACEBACK=all/system/crash widens (crash raises SIGABRT); setuid-like → GOTRACEBACK=none—./go.md §1.2, §3.6pkg.go.dev/runtime, GOTRACEBACK section; runtime source runtime/panic.go (exit(2))[std lib documented] + [runtime implementation]documented
PL-GO-008error interface + wrapping: fmt.Errorf %w, errors.Unwrap/Is/As/Joinfunc Errorf(format string, a ...any) (err error); func Unwrap(err error) error; func Is(err, target error) bool; func As(err error, target any) bool; func Join(errs ...error) error./go.md §1.1pkg.go.dev/errors, pkg.go.dev/fmt; source errors/wrap.go, fmt/errors.go @ go1.27.2[std lib documented]documented
PL-GO-009Execution errors (index out of range, nil map write) → run-time panic with unspecified runtime.Error values—./go.md §1.2go.dev/ref/spec, Run-time panics[language spec]documented
PL-GO-010Unspecified areas: map iteration order; goroutine scheduling implementation-defined, only GOMAXPROCS documented—./go.md §1.7go.dev/ref/spec; pkg.go.dev/runtime (GOMAXPROCS variable)[language spec] / [runtime documented]documented
PL-GO-011Version deltas: generics (1.18); per-iteration loop variables (1.22) affecting closure capture—./go.md §1.8go.dev/doc/go1.18, go.dev/doc/go1.22Go ≥ 1.18 / ≥ 1.22 (per module go line)documented
PL-GO-012os.Exit terminates immediately, defers not run, portability range [0,125]func Exit(code int)./go.md §2.1, §3.3pkg.go.dev/os; source os/proc.go @ go1.27.2[std lib documented]documented
PL-GO-013os.Process handle; Pid field; no finalizer-based reuse guarantee — Wait or Release requiredtype Process struct { Pid int; … }./go.md §2.1pkg.go.dev/os; source os/exec.go @ go1.27.2[std lib documented]documented
PL-GO-014Process.Signal sends a signal; Interrupt unimplemented on Windowsfunc (p *Process) Signal(sig Signal) error./go.md §2.1pkg.go.dev/os[std lib documented]; [Windows delta]documented
PL-GO-015Process.Kill = SIGKILL, does not wait for exitfunc (p *Process) Kill() error./go.md §2.1pkg.go.dev/os[std lib documented]documented
PL-GO-016Process.Wait reaps child, returns ProcessState, releases resources; child-only on most OSesfunc (p *Process) Wait() (*ProcessState, error)./go.md §2.1, §5.6pkg.go.dev/os[std lib documented]documented
PL-GO-017Process.Release renders Process unusable; only needed if Wait is not called (Pid set to −1 on non-Windows)func (p *Process) Release() error./go.md §2.1, §6.6pkg.go.dev/os; source os/exec.go comment @ go1.27.2[std lib documented] + [runtime implementation]documented
PL-GO-018ProcessState: Exited/Success/ExitCode(−1 when signaled or not exited)/Sys→WaitStatus/SysUsage→Rusage/String/Pid/UserTime/SystemTimefunc (p *ProcessState) ExitCode() int; func (p *ProcessState) Sys() any; func (p *ProcessState) SysUsage() any; …./go.md §2.1, §5.6pkg.go.dev/os; source os/exec.go, os/exec_posix.go @ go1.27.2[std lib documented]; String forms [runtime implementation]documented
PL-GO-019os.StartProcess + ProcAttr (Dir/Env/Files/Sys); low-level; files forced blocking on Unixfunc StartProcess(name string, argv []string, attr *ProcAttr) (*Process, error)./go.md §2.1pkg.go.dev/os[std lib documented]documented
PL-GO-020log.Fatal/Fatalf/Fatalln = print + os.Exit(1); exit status always 1; defers not runfunc Fatal(v ...any); func Fatalf(format string, v ...any); func Fatalln(v ...any)./go.md §2.2, §3.5pkg.go.dev/log; source log/log.go @ go1.27.2[std lib documented]documented
PL-GO-021log.Panic/Panicf/Panicln = print + panic() — recoverable, defers run during unwindfunc Panic(v ...any); func Panicf(format string, v ...any); func Panicln(v ...any)./go.md §2.2, §3.5pkg.go.dev/log[std lib documented]documented
PL-GO-022signal.Notify relays signals to buffered channel; same-channel calls expand set; only Stop removesfunc Notify(c chan<- os.Signal, sig …os.Signal)./go.md §2.3, §4.2pkg.go.dev/os/signal; source os/signal/signal.go @ go1.27.2[std lib documented]documented
PL-GO-023signal.NotifyContext cancels ctx on signal/stop/parent-done; context.Cause names the signal; stop releases resourcesfunc NotifyContext(parent context.Context, signals …os.Signal) (ctx context.Context, stop context.CancelFunc)./go.md §2.3, §4.3pkg.go.dev/os/signal; go.dev/doc/go1.16Since Go 1.16documented
PL-GO-024signal.Stop detaches channel; guarantees no more signals on returnfunc Stop(c chan<- os.Signal)./go.md §2.3, §4.4pkg.go.dev/os/signal[std lib documented]documented
PL-GO-025signal.Reset undoes Notify; no args = all handlers reset; restores Go default (not necessarily SIG_DFL)func Reset(sig …os.Signal)./go.md §2.3, §4.4pkg.go.dev/os/signal[std lib documented]documented
PL-GO-026signal.Ignore makes signals no-ops; Ignored reports state; ignores survive startup SIG_IGNfunc Ignore(sig …os.Signal); func Ignored(sig os.Signal) bool./go.md §2.3, §4.4pkg.go.dev/os/signal[std lib documented]documented
PL-GO-027exec.Command builds Cmd (Path/Args only), PATH lookup when no separator; NOT deprecated; Windows CommandLineToArgvW quoting + SysProcAttr.CmdLinefunc Command(name string, arg …string) *Cmd./go.md §2.4, §5.1pkg.go.dev/os/exec; source os/exec/exec.go @ go1.27.2[std lib documented]; quoting [Windows delta]documented
PL-GO-028exec.CommandContext wires ctx; default Cancel = Process.Kill; nil ctx panicsfunc CommandContext(ctx context.Context, name string, arg …string) *Cmd./go.md §2.4, §5.5pkg.go.dev/os/exec; go.dev/doc/go1.20Since Go 1.7; Cancel semantics 1.20documented
PL-GO-029exec.Cmd fields: Path/Args/Env (nil→inherit, dup keys→last wins)/Dir/Stdin/Stdout/Stderr (nil→/dev/null; non-File→copy goroutine)/ExtraFiles/SysProcAttr/Process/ProcessState/Err; Cmd not reusable after Start/Run/Output/CombinedOutput; same-writer Stdout+Stderr ruletype Cmd struct { Path string; Args []string; Env []string; Dir string; Stdin io.Reader; Stdout io.Writer; Stderr io.Writer; ExtraFiles []*os.File; SysProcAttr *syscall.SysProcAttr; Process *os.Process; ProcessState *os.ProcessState; Err error; Cancel func() error; WaitDelay time.Duration; … }./go.md §2.4, §5.2pkg.go.dev/os/exec[std lib documented]documented
PL-GO-030Cmd.Cancel: invoked when ctx done; default kill; success-after-Cancel with non-ErrProcessDone error → Wait returns error; nil Cancel disables immediate actionCancel func() error (field of *Cmd)./go.md §2.4, §5.5pkg.go.dev/os/exec; go.dev/doc/go1.20Since Go 1.20documented
PL-GO-031Cmd.WaitDelay bounds two delays (child not exiting after ctx cancel; pipes held by child); kills straggler, closes pipes; ErrWaitDelay returnedWaitDelay time.Duration (field); var ErrWaitDelay = errors.New("exec: WaitDelay expired before I/O complete")./go.md §2.4, §5.5pkg.go.dev/os/exec; go.dev/doc/go1.20Since Go 1.20documented
PL-GO-032Cmd.Start launches without waiting; after success Wait is required to release resourcesfunc (c *Cmd) Start() error./go.md §2.4, §5.3pkg.go.dev/os/exec[std lib documented]documented
PL-GO-033Cmd.Wait waits process + I/O copying goroutines; returns *ExitError for non-success; releases resourcesfunc (c *Cmd) Wait() error./go.md §2.4, §5.3pkg.go.dev/os/exec[std lib documented]documented
PL-GO-034Cmd.Run = Start + Waitfunc (c *Cmd) Run() error./go.md §2.4pkg.go.dev/os/exec[std lib documented]documented
PL-GO-035Cmd.Output captures stdout, captures stderr into ExitError.Stderr (prefix/suffix saver) when Stderr==nil; CombinedOutput merges both; both error if Stdout/Stderr pre-setfunc (c *Cmd) Output() ([]byte, error); func (c *Cmd) CombinedOutput() ([]byte, error)./go.md §2.4pkg.go.dev/os/exec; saver size [runtime implementation][std lib documented]documented
PL-GO-036Cmd.StdinPipe: auto-closed after Wait sees exit; caller closes early to signal EOFfunc (c *Cmd) StdinPipe() (io.WriteCloser, error)./go.md §2.4, §5.4pkg.go.dev/os/exec[std lib documented]documented
PL-GO-037Cmd.StdoutPipe/StderrPipe: Wait closes pipe after exit — incorrect to Wait before reads complete; incorrect to use Run with these pipesfunc (c *Cmd) StdoutPipe() (io.ReadCloser, error); func (c *Cmd) StderrPipe() (io.ReadCloser, error)./go.md §2.4, §5.4, §6.5pkg.go.dev/os/exec[std lib documented]documented
PL-GO-038exec.ExitError embeds *os.ProcessState (+Stderr from Output); Error() = ProcessState.String()type ExitError struct { *os.ProcessState; Stderr []byte }./go.md §2.4, §5.6pkg.go.dev/os/exec[std lib documented]documented
PL-GO-039exec.LookPath resolves PATH; cwd-relative hits return ErrDot since Go 1.19; stored in Cmd.Err, Start refusesfunc LookPath(file string) (string, error); var ErrDot error./go.md §2.4, §5.1pkg.go.dev/os/exec; source os/exec/lookpath.go; go.dev/blog/path-securitySince Go 1.19documented
PL-GO-040runtime.Goexit: terminates calling goroutine only, defers run, recover returns nil; from main goroutine continues other goroutines; crashes on non-runtime thread; used by testing FailNowfunc Goexit()./go.md §2.5, §3.7pkg.go.dev/runtime; source runtime/panic.go @ go1.27.2[std lib documented]documented
PL-GO-041runtime.GOMAXPROCS queries/sets documented thread limit; blocks in syscalls uncounted; manual set disables 1.25 auto-updatesfunc GOMAXPROCS(n int) int./go.md §2.5, §1.7pkg.go.dev/runtime; go.dev/doc/go1.25[std lib documented]; auto-update 1.25documented
PL-GO-042runtime.LockOSThread pins goroutine to thread; unlocked goroutine exit terminates thread; init-time lock pins main to startup threadfunc LockOSThread(); func UnlockOSThread()./go.md §2.5, §3.8, §4.8pkg.go.dev/runtime[std lib documented]documented
PL-GO-043runtime.SetFinalizer: finalizer runs in separate goroutine at arbitrary time; NO guarantee before program exit; os.File/bufio.Writer example; AddCleanup preferredfunc SetFinalizer(obj any, finalizer any)./go.md §2.5, §6.3, §6.4pkg.go.dev/runtime; source runtime/mfinal.go @ go1.27.2[std lib documented]documented
PL-GO-044syscall.Kill: raw kill(2); pid<=0 targets process group; syscall package frozen-in-practice, x/sys preferred by docsfunc Kill(pid int, sig Signal) (err error)./go.md §2.6, §4.6pkg.go.dev/syscall (linux); source syscall/syscall_linux.go @ go1.27.2[Linux]documented
PL-GO-045syscall.WaitStatus linux method set decodes wait(2) statustype WaitStatus uint32; func (w WaitStatus) Exited() bool; func (w WaitStatus) ExitStatus() int; func (w WaitStatus) Signaled() bool; func (w WaitStatus) Signal() Signal; func (w WaitStatus) CoreDump() bool; func (w WaitStatus) Stopped() bool; func (w WaitStatus) StopSignal() Signal; func (w WaitStatus) Continued() bool; func (w WaitStatus) TrapCause() int./go.md §2.6, §5.6pkg.go.dev/syscall (linux); source syscall/syscall_linux.go @ go1.27.2[Linux]documented
PL-GO-046syscall.SysProcAttr (linux) fields incl. Chroot/Credential/Ptrace/Setsid/Setpgid/Setctty/Ctty/Foreground/Pgid/Pdeathsig/Cloneflags/PidFD; Credential{Uid,Gid,Groups,NoSetGroups}type SysProcAttr struct { … }; type Credential struct { Uid uint32; Gid uint32; Groups []uint32; NoSetGroups bool }./go.md §2.6, §5.8, §5.9pkg.go.dev/syscall (linux); source syscall/exec_linux.go @ go1.27.2[Linux]documented
PL-GO-047sync.WaitGroup Add/Done/Wait + new Go helper; counter zero releases Wait; negative panicsfunc (wg *WaitGroup) Add(delta int); func (wg *WaitGroup) Done(); func (wg *WaitGroup) Wait(); func (wg *WaitGroup) Go(f func())./go.md §2.7, §6.2pkg.go.dev/sync; source sync/waitgroup.go; go.dev/doc/go1.25Go since Go 1.25documented
PL-GO-048sync.Mutex unlock-then-lock synchronizes-before; TryLock memory-model note; sync.Once runs f exactly once, f’s panic counts as returned; OnceFunc/OnceValue/OnceValuesfunc (m *Mutex) Lock(); func (m *Mutex) Unlock(); func (m *Mutex) TryLock() bool; func (o *Once) Do(f func()); func OnceFunc(f func()) func()./go.md §2.7, §6.2pkg.go.dev/sync; source sync/mutex.go, sync/once.go, sync/oncefunc.go; go.dev/doc/go1.21OnceFunc since Go 1.21documented
PL-GO-049Per-path table: main return → status 0, own defers run, nothing else (no flush, no finalizers, other goroutines killed)—./go.md §3.2go.dev/ref/spec + pkg.go.dev/os (composite of PL-GO-001/004/012/043)[language spec] + [std lib documented]documented
PL-GO-050Per-path table: os.Exit(n) → status n, defers not run, no flush, no finalizers—./go.md §3.2, §3.3pkg.go.dev/os Exit[std lib documented]documented
PL-GO-051Per-path table: log.Fatal → status always 1, defers not run (is os.Exit(1))—./go.md §3.2, §3.5pkg.go.dev/log Fatal[std lib documented]documented
PL-GO-052Per-path table: unrecovered panic (any goroutine) → only panicking goroutine’s defers run; process exit 2 + traceback; main cannot recover—./go.md §3.2, §3.6go.dev/ref/spec Handling panics + pkg.go.dev/runtime GOTRACEBACK[language spec] + [std lib documented]documented
PL-GO-053Per-path table: runtime.Goexit → goroutine-only, all its defers run, process continues; Goexit in main goroutine lets other goroutines continue—./go.md §3.2, §3.7pkg.go.dev/runtime Goexit[std lib documented]documented
PL-GO-054Per-path table: default-signal death (SIGINT/SIGTERM/SIGHUP un-notified) → dies by signal (WIFSIGNALED; shell 128+N); SIGQUIT default → all-goroutine stack dump then death by signal—./go.md §3.2, §4.4pkg.go.dev/os/signal package doc[std lib documented]; decode [Linux]documented
PL-GO-055Exit-status range/truncation: [0,125] portability note; kernel keeps 8 bits of wait status; ≥128 collides with signal encodings—./go.md §3.3pkg.go.dev/os Exit; [Linux] wait(2) encoding via ../../linux/process-exit-signal/languages/go.md[std lib documented] + [Linux]documented
PL-GO-056Notify channel contract: will not block sending; caller must supply buffer; size 1 suffices for one signal; full channel ⇒ dropped (no queueing)—./go.md §4.2pkg.go.dev/os/signal Notify doc (verbatim)[std lib documented]documented
PL-GO-057Notify changes disposition for SIGHUP/SIGINT/SIGQUIT/SIGABRT/SIGTERM, job-control signals, and no-op signals (SIGUSR1/2, SIGPIPE, SIGCHLD, SIGURG, …); SIGKILL/SIGSTOP uncatchable—./go.md §4.4pkg.go.dev/os/signal package doc (verbatim)[std lib documented]documented
PL-GO-058Default behavior table: sync signals → run-time panic; SIGHUP/SIGINT/SIGTERM → exit; SIGQUIT/SIGILL/SIGTRAP/SIGABRT/… → exit with stack dump; SIGTSTP/TTIN/TTOU → system default; SIGPROF → runtime CPU profiling; others no-op; startup SIG_IGN(SIGHUP/SIGINT) preserved; startup mask partially unblocked, inherited by subprocesses—./go.md §4.4pkg.go.dev/os/signal package doc (verbatim)[std lib documented]; SIGCANCEL/SIGSETXID [Linux]documented
PL-GO-059Restoration semantics: Reset restores system default, Ignore ignores entirely; Stop on all channels re-enables default; Stop guarantees no further delivery to c—./go.md §4.4pkg.go.dev/os/signal (Notify/Reset/Ignore/Stop docs)[std lib documented]documented
PL-GO-060SIGPIPE: un-notified writes to broken pipe on fd 1/2 → program exits with SIGPIPE; other fds → write returns EPIPE; Notify(SIGPIPE) removes fd-number dependence—./go.md §4.5pkg.go.dev/os/signal package doc (verbatim)[std lib documented]; [Linux] substratedocumented
PL-GO-061cgo signal protocol: C handlers must use SA_ONSTACK; sync-signal handlers must chain to Go handler; forwarding on non-Go threads; c-shared/c-archive handler installation—./go.md §4.7pkg.go.dev/os/signal package doc, cgo/SWIG sections (verbatim)[std lib documented]; [Linux] sigaction layerdocumented
PL-GO-062Async preemption: goroutines preemptible since 1.14; Unix programs receive more signals, slow syscalls fail with EINTR; GODEBUG=asyncpreemptoff=1; signal is SIGURG—./go.md §4.8go.dev/doc/go1.14; pkg.go.dev/runtime (asyncpreemptoff); runtime source signal_unix.go (const sigPreempt = _SIGURG)Go ≥ 1.14; SIGURG [runtime implementation]documented
PL-GO-063exec builds argv arrays — no shell; pipes/globs are literal; safe sh -c pattern passes user data as positional parameter; Windows quoting delta—./go.md §5.1pkg.go.dev/os/exec Command doc; go.dev/blog/path-security[std lib documented]; [Windows delta]documented
PL-GO-064Start→Wait resource duty; Wait reaps (zombie prevention); Kill does not wait — Wait after Kill required; orphaned grandchildren reparent to init—./go.md §5.3, §5.6pkg.go.dev/os/exec Start/Wait; pkg.go.dev/os Wait[std lib documented]; zombie/reparent [Linux]documented
PL-GO-065Pipe-buffer deadlock: unread/filled pipes block child and Wait; fixed by draining, buffer writers, or WaitDelay—./go.md §5.4, §6.5pkg.go.dev/os/exec Stdin/Stdout doc; [Linux] pipe(7) via ./c.md[std lib documented] + [Linux]documented
PL-GO-066StdoutPipe/StderrPipe ordering rules: incorrect to Wait before reads complete; incorrect to Run with pipes; StdinPipe close-to-EOF duty—./go.md §5.4pkg.go.dev/os/exec StdinPipe/StdoutPipe/StderrPipe docs (verbatim)[std lib documented]documented
PL-GO-067ExtraFiles: entry i becomes child fd 3+i; excludes std streams; unsupported on Windows; parent must close copies—./go.md §5.7pkg.go.dev/os/exec ExtraFiles doc (verbatim)[std lib documented]; [Windows delta]documented
PL-GO-068Process groups: Setpgid/Pgid (Pgid==0 → child pid), Setsid, Setctty/Foreground/Ctty; kill(−pgid, sig) group kill via syscall.Kill—./go.md §5.8pkg.go.dev/syscall SysProcAttr (linux, verbatim field docs); kill(2) via ./c.md[Linux]documented
PL-GO-069Credential dropping: child setuid/setgid to Uid/Gid (+Groups, NoSetGroups) before exec—./go.md §5.9pkg.go.dev/syscall (linux) Credential; source syscall/exec_linux.go[Linux]documented
PL-GO-070Pdeathsig: kernel signals child when creating thread dies — may precede process death; unreliable alone (go.dev/issue/27505)Pdeathsig Signal (SysProcAttr field)./go.md §5.10pkg.go.dev/syscall (linux) verbatim field doc[Linux]documented
PL-GO-071Cancellation flow: ctx done → Cancel (default Kill) → WaitDelay bounds stragglers/pipe holders → ErrWaitDelay on clean exit with expired pipes; Cancel=nil disables immediate action—./go.md §5.5pkg.go.dev/os/exec Cmd.Cancel/WaitDelay docs (verbatim); go.dev/doc/go1.20Since Go 1.20documented
PL-GO-072Exit decode: ExitError.Error() forms (“exit status N”, “signal: killed”, “ (core dumped)“); ExitCode() = −1 when signaled/not exited—./go.md §5.6pkg.go.dev/os ProcessState docs; String forms verified in os/exec_posix.go[std lib documented]; String [runtime implementation]documented
PL-GO-073WaitStatus decode usage: Exited/ExitStatus for normal exit; Signaled/Signal/CoreDump for signal death; Stopped/StopSignal for job control; Continued; TrapCause (ptrace)—./go.md §5.6pkg.go.dev/syscall (linux); source syscall/syscall_linux.go @ go1.27.2[Linux]documented
PL-GO-074Creation mechanism: no posix_spawn API; StartProcess → forkAndExecInChild with clone(CLONE_VMCLONE_VFORK, +CLONE_PIDFD when PidFD set), CLOEXEC error pipe, runtime_BeforeFork/AfterFork hooks—./go.md §5.12source syscall/exec_linux.go @ go1.27.2[runtime implementation]; [Linux]
PL-GO-075Cmd concurrency rules: Wait not concurrent from multiple goroutines; custom Cancel must not call Wait; no reuse after Start/Run/Output/CombinedOutput; field mutation after Start is a race—./go.md §5.3, §6.6pkg.go.dev/os/exec Wait doc (verbatim)[std lib documented]documented
PL-GO-076WaitGroup ordering: positive-delta Add when counter zero must happen before Wait; reuse requires prior Wait returns; Go 1.25 runtime panic on concurrent Add/Wait misuse; Go helper combines add+spawn—./go.md §6.2pkg.go.dev/sync WaitGroup.Add doc; source sync/waitgroup.go; go.dev/doc/go1.25[std lib documented]; panic check since Go 1.25 [runtime implementation]documented
PL-GO-077os.File fd ownership: finalizer may close collected file’s descriptor (invalidates Fd); explicit Close is the contract; defer-in-loop leaks fds until function exit—./go.md §6.3pkg.go.dev/os File.Fd doc (verbatim); runtime.SetFinalizer doc[std lib documented]; finalizer presence [runtime implementation]documented
PL-GO-078Exit-path resource semantics: no guarantee finalizers run before program exit; bufio.Writer buffer not flushed at exit (SetFinalizer doc warning); fmt/log default outputs unbuffered—./go.md §6.4, §3.2pkg.go.dev/runtime SetFinalizer doc (verbatim)[std lib documented]documented
PL-GO-079Leaks: abandoned StdoutPipe leaves copy goroutine blocked + fds held; unwaited children become zombies; GODEBUG=execwait=2 finalizer panics “exec: Cmd started a Process but leaked without a call to Wait” with creation stack—./go.md §6.6, §5.3pkg.go.dev/os/exec; source os/exec/exec.go (execwait godebug) @ go1.27.2[std lib documented]; detection [runtime implementation]documented
PL-GO-080GOMAXPROCS × subprocess accounting: GOMAXPROCS caps only Go threads; children have own threads; Go 1.25 default follows cgroup CPU limit (shared budget); manual set disables auto-update; CgroupFD/UseCgroupFD place child in cgroup—./go.md §6.8, §1.7go.dev/doc/go1.25 (verbatim); pkg.go.dev/runtime; pkg.go.dev/syscall (linux CgroupFD)[std lib documented]; cgroup [Linux]documented