This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway.git
The following commit(s) were added to refs/heads/master by this push:
new 8e773c7773 CAUSEWAY-2297: fixes _OsUtil#terminateProcessByPid
8e773c7773 is described below
commit 8e773c7773be5d480aa120be34bb288cf0bfdd97
Author: Andi Huber <[email protected]>
AuthorDate: Thu Mar 14 05:32:52 2024 +0100
CAUSEWAY-2297: fixes _OsUtil#terminateProcessByPid
---
.../main/java/org/apache/causeway/commons/internal/os/_OsUtil.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/commons/src/main/java/org/apache/causeway/commons/internal/os/_OsUtil.java
b/commons/src/main/java/org/apache/causeway/commons/internal/os/_OsUtil.java
index 243b64b4f6..bcd124709a 100644
--- a/commons/src/main/java/org/apache/causeway/commons/internal/os/_OsUtil.java
+++ b/commons/src/main/java/org/apache/causeway/commons/internal/os/_OsUtil.java
@@ -127,10 +127,10 @@ public class _OsUtil {
}
val rt = Runtime.getRuntime();
val os = OS.current();
- final String cmd;
+ final String[] cmd;
switch(os) {
case WINDOWS:
- cmd = String.format("taskkill /F /PID %s /T", pidTrimmed);
+ cmd = new String[] {"taskkill.exe", "/F", "/PID", pidTrimmed,
"/T"};
break;
case LINUX:
//XXX implement eventually
@@ -139,7 +139,7 @@ public class _OsUtil {
default:
throw _Exceptions.unsupportedOperation("OS " + os + " not (yet)
supported");
}
- rt.exec(new String[]{cmd});
+ rt.exec(cmd);
}
/**