package process

import "github.com/docker/docker/pkg/process"

Package process provides a set of basic functions to manage individual processes.

Index

Functions

func Alive

func Alive(pid int) bool

Alive returns true if process with a given pid is running. It only considers positive PIDs; 0 (all processes in the current process group), -1 (all processes with a PID larger than 1), and negative (-n, all processes in process group "n") values for pid are never considered to be alive.

func Kill

func Kill(pid int) error

Kill force-stops a process. It only considers positive PIDs; 0 (all processes in the current process group), -1 (all processes with a PID larger than 1), and negative (-n, all processes in process group "n") values for pid are ignored. Refer to KILL(2) for details.

func Zombie

func Zombie(pid int) (bool, error)

Zombie return true if process has a state with "Z". It only considers positive PIDs; 0 (all processes in the current process group), -1 (all processes with a PID larger than 1), and negative (-n, all processes in process group "n") values for pid are ignored. Refer to PROC(5) for details.

Source Files

doc.go process_unix.go

Version
v28.0.0-rc.2+incompatible
Published
Feb 17, 2025
Platform
js/wasm
Imports
7 packages
Last checked
2 minutes ago

Tools for package owners.