signals

package
v0.0.0-...-e2f0dde Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Kill

func Kill(process *os.Process, sig os.Signal, sigChildren bool) error

send signal to the proces

Args:

process - the process which the signal should be sent to
sig - the signal will be sent
sigChildren - true if the signal needs to be sent to the children also

注意负号, 杀掉包括子进程 Improved by AS 20190413: 此处加上 -1 是多余的,killPid 里面已经作了 "-1" 处理

func KillPid

func KillPid(pid int, sig os.Signal, sigChildren bool) error

func ToSignal

func ToSignal(signalName string) (os.Signal, error)

convert a signal name to signal

Types

This section is empty.

Jump to

Keyboard shortcuts

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