mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
9d5e754caa
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
27 lines
672 B
Go
27 lines
672 B
Go
//go:build linux || freebsd || darwin || windows
|
|
// +build linux freebsd darwin windows
|
|
|
|
package system
|
|
|
|
import "github.com/docker/docker/pkg/process"
|
|
|
|
var (
|
|
// IsProcessAlive returns true if process with a given pid is running.
|
|
//
|
|
// Deprecated: use [process.Alive].
|
|
IsProcessAlive = process.Alive
|
|
|
|
// IsProcessZombie return true if process has a state with "Z"
|
|
//
|
|
// Deprecated: use [process.Zombie].
|
|
//
|
|
// TODO(thaJeztah): remove the Windows implementation in process once we remove this stub.
|
|
IsProcessZombie = process.Zombie
|
|
)
|
|
|
|
// KillProcess force-stops a process.
|
|
//
|
|
// Deprecated: use [process.Kill].
|
|
func KillProcess(pid int) {
|
|
_ = process.Kill(pid)
|
|
}
|