aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java34
2 files changed, 34 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ff2e9b..5ca4e5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-08-21 Jiri Vanek <[email protected]>
+ * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java:
+ (sigInt), (sigKill), (sigTerm) new methods for various killing of
+ processes by kill.
+ (kill) new method, launching kill process.
+ (destroyProcess ) is now calling sigInt instead of unwrapped sigTerm.
+
+2012-08-21 Jiri Vanek <[email protected]>
+
* launcher/javaws.in: java is now launched by exec
2012-08-19 Thomas Meyer <[email protected]>
diff --git a/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java b/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java
index 4bb5187..b435eeb 100644
--- a/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java
+++ b/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java
@@ -166,18 +166,36 @@ class ProcessAssasin extends Thread {
Field f = p.getClass().getDeclaredField("pid");
f.setAccessible(true);
String pid = (f.get(p)).toString();
- List<String> ll=new ArrayList<String>(4);
- ll.add("kill");
- ll.add("-s");
- ll.add("SIGTERM");
- ll.add(pid);
- ServerAccess.executeProcess(ll);//sync, but acctually release
- //before affected application close
- Thread.sleep(1000);
+ sigInt(pid);
+ //sigTerm(pid);
+ //sigKill(pid);
} catch (Exception ex) {
ServerAccess.logException(ex);
} finally {
p.destroy();
}
}
+
+ public static void sigInt(String pid) throws Exception {
+ kill(pid, "SIGINT");
+ }
+
+ public static void sigKill(String pid) throws Exception {
+ kill(pid, "SIGKILL");
+ }
+
+ public static void sigTerm(String pid) throws Exception {
+ kill(pid, "SIGTERM");
+ }
+
+ public static void kill(String pid,String signal) throws InterruptedException, Exception {
+ List<String> ll = new ArrayList<String>(4);
+ ll.add("kill");
+ ll.add("-s");
+ ll.add(signal);
+ ll.add(pid);
+ ServerAccess.executeProcess(ll); //sync, but acctually release
+ //before affected application close
+ Thread.sleep(1000);
+ }
}