Help us shape the future of Go! Take the 2026 Go Developer Survey

procs

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package procs configures subprocess execution so that cancelling a command's context actually bounds the call. Two os/exec pitfalls otherwise conspire to hang the CLI forever: when output is captured through writers (not *os.File), Wait waits on pipe-copy goroutines that only finish at EOF — i.e. when every process holding the pipe write-end exits — and CommandContext's default cancel kills only the direct child, so a backgrounded grandchild keeps the pipe open indefinitely.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Group

func Group(cmd *exec.Cmd)

Group prepares cmd for group execution: the subprocess runs in its own process group, cancelling cmd's context SIGKILLs the whole group (grandchildren included), and WaitDelay stops Wait from blocking on output pipes held open by whatever survived the kill.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL