mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
18 lines
300 B
Go
18 lines
300 B
Go
// +build darwin
|
|
|
|
package node
|
|
|
|
import (
|
|
"fmt"
|
|
"syscall"
|
|
)
|
|
|
|
func KillProcess(processId int){
|
|
err := syscall.Kill(processId,syscall.Signal(10))
|
|
if err != nil {
|
|
fmt.Printf("kill processid %d is fail:%+v.\n",processId,err)
|
|
}else{
|
|
fmt.Printf("kill processid %d is successful.\n",processId)
|
|
}
|
|
}
|