process

package
v0.0.0-...-6eab4f5 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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