public void testFileCreation() { ProcessUtil pu = new ProcessUtil("1234", null, null); File winKill; winKill = pu.getWindowsKillFile(); assertTrue(winKill.exists()); winKill.delete(); assertFalse(winKill.exists()); winKill = pu.getWindowsKillFile(); assertTrue(winKill.exists()); } }
ProcessUtil(FileUtil fileUtil, String pid, PrintStream out, PrintStream err, Str str, Shell.Factory shellFactory, Streams streams, Threads threads) { this.pid = (pid != null) ? pid.trim() : "-1"; this.out = out; this.err = err; this.fileUtil = fileUtil; this.str = str; this.shellFactory = shellFactory; this.streams = streams; this.threads = threads; if (fileUtil.isWindows()) { this.killCommand = getWindowsKillFile().getPath(); } else { this.killCommand = "kill"; } }
public ProcessUtil(String pid, PrintStream out, PrintStream err, File installDir, Utils utils, String windowsKillCommand) { this.installDir = installDir; this.pid = (pid != null) ? pid.trim() : "-1"; this.out = out; this.err = err; this.utils = utils; if (utils.files().isWindows()) { this.killCommand = getWindowsKillFile(windowsKillCommand).getPath(); } else { this.killCommand = "kill"; } }
public void testFileCreation() { ProcessUtil pu = new ProcessUtil("1234", devNull, devNull, dir); File winKill; winKill = pu.getWindowsKillFile(wk); assertTrue(winKill.exists()); winKill.delete(); assertFalse(winKill.exists()); winKill = pu.getWindowsKillFile(wk); assertTrue(winKill.exists()); } }
public ProcessUtil(String pid, PrintStream out, PrintStream err, File installDir, Utils utils) { this.installDir = installDir; this.pid = (pid != null) ? pid.trim() : "-1"; this.out = out; this.err = err; this.utils = utils; if (utils.files().isWindows()) { this.killCommand = getWindowsKillFile().getPath(); } else { this.killCommand = "kill"; } }