Documentation ¶ Rendered for linux/amd64 windows/amd64 darwin/amd64 js/wasm Index ¶ func Kill(process *os.Process, sig os.Signal, sigChildren bool) error func KillPid(pid int, sig os.Signal, sigChildren bool) error func ToSignal(signalName string) (os.Signal, error) 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. Source Files ¶ View all Source files signal.go Click to show internal directories. Click to hide internal directories.