Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KillTracked ¶
KillTracked terminates cmd's process tree; the handle is unused off Windows.
func KillTree ¶
KillTree kills cmd's whole process group. StartTracked (and SetProcessGroupKill for children started outside it) put the child in its own group via Setpgid, so the negative-pid signal reaches every descendant — a launcher whose sub-daemon survives the parent (e.g. codegraph's bundled node runtime) included, where a plain Process.Kill would only hit the direct child and orphan the grandchild.
func LowPriority ¶
LowPriority is a no-op off Windows; unix sets niceness after start.
func LowPriorityStarted ¶
LowPriorityStarted renices a started command to below-normal priority, for background helpers (indexers) that must not starve the user's machine.
func ResolvePowerShell ¶
func ResolvePowerShell() string
ResolvePowerShell is a no-op on non-Windows platforms. It exists so that shared code can call proc.ResolvePowerShell() without build-tag guards; the callers are themselves Windows-only at runtime.
func SetProcessGroupKill ¶
SetProcessGroupKill makes cmd start in its own process group so KillTree can reap its whole tree. Use it for children started outside StartTracked (e.g. a one-shot CombinedOutput). It is a no-op on Windows, where the Job Object that TrackTree/StartTracked assigns handles the tree instead.
func StartTracked ¶
StartTracked starts cmd in its own process group so KillTracked / KillTree can reap its whole tree. Off Windows the process group is the equivalent of the Windows Job Object; it returns a 0 handle, and KillTracked falls back to KillTree.
Types ¶
This section is empty.