Documentation
¶
Overview ¶
Package sysproc — process-group reaping helpers shared across clawtool callsites (Bash tool, Verify tool, hooks subsystem). The pattern mirrors internal/tools/core/exec_unix.go but lives in its own package so non-tool callers (hooks, future plan runner) can reuse it without an import cycle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyGroup ¶
ApplyGroup makes cmd run in its own process group so KillGroup can SIGKILL the whole tree (including shell children like `sleep` that would otherwise hold stdio pipes open and stall Wait).
Callers that use exec.CommandContext can additionally set cmd.Cancel themselves to wire context cancellation to the group kill — we deliberately don't touch cmd.Cancel here because plain exec.Command() rejects a non-nil Cancel at Start time.
func ApplyGroupWithCtxCancel ¶
ApplyGroupWithCtxCancel is the CommandContext-friendly variant: it sets Setpgid AND wires cmd.Cancel to the group SIGKILL. Use this when you've created the command via exec.CommandContext and want ctx-cancellation to reap the whole tree.
Types ¶
This section is empty.