Merge pull request #847 from jccg891113/master

新增mac环境下的node实现
This commit is contained in:
duanhf2012
2020-09-02 13:44:15 +08:00
committed by GitHub

17
node/node_mac.go Normal file
View File

@@ -0,0 +1,17 @@
// +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)
}
}