proc

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 6 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

Process group control and process table queries shared by the shell and the MCP child processes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Group

func Group(cmd *exec.Cmd)

Puts the command in its own process group so Kill can reach every descendant

func Kill

func Kill(cmd *exec.Cmd) error

Kills the command together with every process in its group

func KillTree

func KillTree(pid int)

Kills pid and every descendant, sweeping twice so children forked during the first pass die too

Types

type Process

type Process struct {
	PID  int
	PPID int
	// Exited but not yet reaped by its parent
	Zombie bool
}

One row of the process table

type Table

type Table []Process

Processes running at one instant

func (Table) Descendants

func (t Table) Descendants(pid int) []int

Every live descendant of pid, parents before their children, zombies left for their parent to reap

Jump to

Keyboard shortcuts

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