/** * Create the Watchdog to kill a runaway process. * * @return instance of ExecuteWatchdog. * * @throws BuildException under unknown circumstances. */ protected ExecuteWatchdog createWatchdog() throws BuildException { return (timeout == null) ? null : new ExecuteWatchdog(timeout); }
/** * Create the Watchdog to kill a runaway process. * * @return new watchdog. * * @throws BuildException under unknown circumstances. * * @since Ant 1.5 */ protected ExecuteWatchdog createWatchdog() throws BuildException { if (timeout == null) { return null; } return new ExecuteWatchdog(timeout); }
/** * @return <tt>null</tt> if there is no timeout value, otherwise the * watchdog instance. * * @throws BuildException under unspecified circumstances * @since Ant 1.2 */ protected ExecuteWatchdog createWatchdog() /*throws BuildException*/ { if(m_timeout == null) { return null; } return new ExecuteWatchdog(m_timeout.longValue()); }
/** * @return <tt>null</tt> if there is no timeout value, otherwise the watchdog instance. * @throws BuildException under unspecified circumstances * @since Ant 1.2 */ protected ExecuteWatchdog createWatchdog() /*throws BuildException*/ { if (m_timeout == null) { return null; } return new ExecuteWatchdog(m_timeout.longValue()); }
timeout == null ? null : new ExecuteWatchdog(timeout)); exe.setAntRun(pc.getProject()); if (Os.isFamily("openvms")) {
/** * @return <tt>null</tt> if there is a timeout value, otherwise the * watchdog instance. * * @throws BuildException under unspecified circumstances * @since Ant 1.2 */ protected ExecuteWatchdog createWatchdog() throws BuildException { if (timeout == null) { return null; } return new ExecuteWatchdog((long) timeout); }
private ExecuteWatchdog createWatchdog() { ExecuteWatchdog watchdog = (_timeOut > 0L) ? new ExecuteWatchdog(_timeOut) : null; return watchdog; }
public void execute(String command, List<String> args, InputStream in, OutputStream out) throws Exception { List<String> cmdLine = new ArrayList<String>(); if (isWindows()) { cmdLine.add("cmd.exe"); cmdLine.add("/c"); } cmdLine.add(resolveCommandForOS(command)); // add command-specific arguments cmdLine.addAll(getCommandArguments(command)); // add user arguments if (args != null) { cmdLine.addAll(args); } ExecuteWatchdog watchdog = new ExecuteWatchdog( timeout ); ExecuteStreamHandler streamHandler = new PumpStreamHandler( out, out, in ); Execute exec = new Execute( streamHandler, watchdog ); exec.setCommandline( cmdLine.toArray(new String[] {}) ); List<String> env = getCommandEnvironment(command); if (!env.isEmpty()) { exec.setEnvironment(env.toArray(new String[] {}) ); } exec.execute(); }
timeout == null ? null : new ExecuteWatchdog(timeout.longValue())); exe.setAntRun(pc.getProject());