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

process

package
v1.1.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(cmd *exec.Cmd)

Configure makes the child the leader of a dedicated process group before it starts.

func ConfigureBackground added in v0.9.1

func ConfigureBackground(cmd *exec.Cmd)

ConfigureBackground 只为 Windows 的通用后台调用补 no-console 属性, 不改变 Darwin/Linux 现有的进程组语义。

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

Controller owns the operating-system process group created for one command.

func Attach

func Attach(cmd *exec.Cmd) (*Controller, error)

Attach records the process group after the command has started.

func AttachPID

func AttachPID(pid int) (*Controller, error)

func (*Controller) Close

func (c *Controller) Close() error

Close releases platform resources. Unix process groups do not own handles.

func (*Controller) Terminate

func (c *Controller) Terminate() error

Terminate stops the whole process tree represented by the process group.

Jump to

Keyboard shortcuts

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