新增retire命令参数用于将置于服务退休状态,使得服务软关闭

This commit is contained in:
duanhf2012
2023-10-09 15:27:01 +08:00
parent ba019ac466
commit c0971a46a7
16 changed files with 504 additions and 203 deletions

View File

@@ -2,10 +2,28 @@
package node
func KillProcess(processId int){
import (
"os"
"fmt"
)
func KillProcess(processId int){
procss,err := os.FindProcess(processId)
if err != nil {
fmt.Printf("kill processid %d is fail:%+v.\n",processId,err)
return
}
err = procss.Kill()
if err != nil {
fmt.Printf("kill processid %d is fail:%+v.\n",processId,err)
}
}
func GetBuildOSType() BuildOSType{
return Windows
}
func RetireProcess(processId int){
fmt.Printf("This command does not support Windows")
}