package process

import "github.com/dotcloud/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.1.1+incompatible (latest)
Published
Apr 18, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
51 minutes ago

Tools for package owners.