mirror of https://github.com/v2ray/v2ray-core
try another way to kill process on windows
parent
35762b7b28
commit
4c798584ff
|
@ -113,7 +113,11 @@ func CloseAllServers(servers []*exec.Cmd) {
|
||||||
Content: "Closing all servers.",
|
Content: "Closing all servers.",
|
||||||
})
|
})
|
||||||
for _, server := range servers {
|
for _, server := range servers {
|
||||||
server.Process.Signal(syscall.SIGTERM)
|
if runtime.GOOS == "windows" {
|
||||||
|
server.Process.Kill()
|
||||||
|
} else {
|
||||||
|
server.Process.Signal(syscall.SIGTERM)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for _, server := range servers {
|
for _, server := range servers {
|
||||||
server.Process.Wait()
|
server.Process.Wait()
|
||||||
|
|
Loading…
Reference in New Issue