Explorar el Código

try another way to kill process on windows

Darien Raymond hace 7 años
padre
commit
4c798584ff
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      testing/scenarios/common.go

+ 5 - 1
testing/scenarios/common.go

@@ -113,7 +113,11 @@ func CloseAllServers(servers []*exec.Cmd) {
 		Content:  "Closing all 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 {
 		server.Process.Wait()