process

package
v0.0.0-...-2b1da1d Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SIGKILL = 9
	SIGTERM = 15
	SIGSTOP = 19
	SIGCONT = 18
)

signal

Variables

This section is empty.

Functions

func CheckExistAndKillByKey

func CheckExistAndKillByKey(ctx context.Context, processKey string) error

func CheckExistAndSignalByKey

func CheckExistAndSignalByKey(ctx context.Context, processKey string, signal int) error

func ExistPid

func ExistPid(ctx context.Context, pid int) (bool, error)

func ExistProcessByKey

func ExistProcessByKey(ctx context.Context, key string) (bool, error)

func GetPidByKeyWithoutRunUser

func GetPidByKeyWithoutRunUser(ctx context.Context, key string) (int, error)

func GetPidListByKey

func GetPidListByKey(ctx context.Context, cr, cId string, key string) ([]int, error)

GetPidListByKey return pidList in host's pid ns, not in container's pid ns

func GetPidListByListStrAndKey

func GetPidListByListStrAndKey(ctx context.Context, cr, cId string, pidListStr, key string) (pidList []int, err error)

func GetPidListByPidOrKeyInContainer

func GetPidListByPidOrKeyInContainer(ctx context.Context, cr, cId string, pid int, key string) ([]int, error)

GetPidListByPidOrKeyInContainer return pidList in host's or container's pid ns

func GetPidListByStr

func GetPidListByStr(ctx context.Context, pidStr string) ([]int, error)

func GetProcessByKey

func GetProcessByKey(ctx context.Context, cr, cId string, key string) ([]int, error)

GetProcessByKey in container's pid namespace

func GetProcessByPid

func GetProcessByPid(ctx context.Context, cr, cId string, pid int) (int, error)

GetProcessByPid in container's pid namespace

func KillPidWithSignal

func KillPidWithSignal(ctx context.Context, pid int, signal int) error

func KillProcessByKey

func KillProcessByKey(ctx context.Context, key string, signal int) error

func SignalProcessByKey

func SignalProcessByKey(ctx context.Context, cr, cId string, key string, signal int) error

SignalProcessByKey in container's pid namespace

func SignalProcessByPid

func SignalProcessByPid(ctx context.Context, cr, cId string, pid, signal int) error

SignalProcessByPid in container's pid namespace

func WaitDefunctProcess

func WaitDefunctProcess(ctx context.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

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