process

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package process owns the platform specific process tree of one action.

On POSIX every child leads its own process group, so cancelation can signal the whole tree. On Windows children join a job object; when the host refuses a nested assignment (a restricted job already owns the process, as on CI runners) the tree is terminated by walking live parent process ids instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TreeControl

type TreeControl interface {
	// SysProcAttr returns the attributes the child must be created with.
	SysProcAttr() *syscall.SysProcAttr
	// Attach binds the started process to the tree, so descendants are owned.
	Attach(cmd *exec.Cmd) error
	// Graceful asks the tree to stop.
	Graceful(cmd *exec.Cmd)
	// Force terminates the tree.
	Force(cmd *exec.Cmd)
	// Release frees platform resources. It must be called exactly once per
	// created control.
	Release()
}

TreeControl owns the child process tree of one action. The engine creates the strongest available control before starting the process, so a missing capability can fail the action before anything is launched.

func New

func New(_ bool) (TreeControl, error)

New returns the tree control for this platform. Process groups are always available on POSIX, so useJob is ignored.

Jump to

Keyboard shortcuts

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