/** * @param force */ private void kill(boolean force) { String threadName = "killing process " + pid; if (force) { threadName = "force " + threadName; } launchShell(threadName, killArgs(force), 10); }
/** * @param force */ private void kill(boolean force) { String threadName = "killing process " + pid; if (force) { threadName = "force " + threadName; } launchShell(threadName, killArgs(force), 10); }
/** * @param force */ private void kill(boolean force) { String threadName = "killing process " + pid; if (force) { threadName = "force " + threadName; } launchShell(threadName, killArgs(force), 10); }
public void testForce() { ProcessUtil kp = new ProcessUtil("4321", null, null); String[] args = kp.killArgs(true); assertEquals("-9", args[1]); }
public void testForce() { ProcessUtil kp = new ProcessUtil("4321", devNull, devNull, dir); String[] args = kp.killArgs(true); assertEquals("-9", args[1]); }
public void testKillCommandLineWindows() { Utils utils = new Utils(); utils.setFiles(new Files() { public boolean isWindows() { return true; } }); String pid = "2342"; ProcessUtil kp = new ProcessUtil(pid, devNull, devNull, dir, utils, wk); String[] args = kp.killArgs(false); assertTrue(args[0], args[0].endsWith("kill.exe")); assertEquals(pid, args[args.length - 1]); }
public void testKillCommandLineUnix() { FileUtil fu = new FileUtil() { public boolean isWindows() { return false; } }; String pid = "2342"; ProcessUtil kp = new ProcessUtil(fu, pid, null, null, new Str(), null, null, null); String[] args = kp.killArgs(false); assertEquals(args[0], "kill"); assertEquals(pid, args[args.length - 1]); }
public void testKillCommandLineWindows() { FileUtil fu = new FileUtil() { public boolean isWindows() { return true; } }; String pid = "2342"; ProcessUtil kp = new ProcessUtil(fu, pid, null, null, new Str(), null, new Streams(), null); String[] args = kp.killArgs(false); assertTrue(args[0], args[0].endsWith("kill.exe")); assertEquals(pid, args[args.length - 1]); }
public void testKillCommandLineUnix() { Utils utils = new Utils(); utils.setFiles(new Files() { public boolean isWindows() { return false; } }); String pid = "2342"; ProcessUtil kp = new ProcessUtil(pid, devNull, devNull, dir, utils, wk); String[] args = kp.killArgs(false); assertEquals(args[0], "kill"); assertEquals(pid, args[args.length - 1]); }