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 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"; } }
/** * On UNIX systems, in order for a file to be executable, it needs to have * the execute bit set. This method executes a "chmod +x filename" */ public void addExecutableRights(File executable, PrintStream out, PrintStream err) { if (isWindows()) { return; } String[] args = { "chmod", "+x", executable.getPath() }; String tName = "make " + executable + " runable"; shellFactory.newShell(args, tName, out, err).run(); }
/** * On UNIX systems, in order for a file to be executable, it needs to have * the execute bit set. This method executes a "chmod +x filename" */ public void addExecutableRights(File executable, PrintStream out, PrintStream err) { if (isWindows()) { return; } String[] args = { "/bin/chmod", "+x", executable.getPath() }; String tName = "make " + executable + " runable"; shellFactory.newShell(args, tName, out, err).run(); }