public class AsyncExecute
extends org.apache.tools.ant.taskdefs.Execute
| Modifier and Type | Class and Description |
|---|---|
static class |
AsyncExecute.ProcessStillAliveException
Thrown when a process remains alive after attempting to destroy it
|
| Constructor and Description |
|---|
AsyncExecute() |
| Modifier and Type | Method and Description |
|---|---|
Process |
asyncSpawn()
Copied from spawn, but actually returns the Process, instead of void
|
int |
execute() |
static boolean |
isAlive(Process p)
Is this process still running ?
|
static int |
killProcess(Process process)
Forcibly kills a process, using OS tools like "kill" as a last resort
|
protected void |
setActualExecuteEnvironment() |
void |
setEnvironmentVariable(String name,
String value) |
void |
setLibraryPath(String newLibraryPath) |
static void |
sleepTight(long timeout)
Sleeps without explicitly throwing an InterruptedException
|
static void |
sleepTightInSeconds(long timeoutInSeconds)
Sleeps without explicitly throwing an InterruptedException
|
static int |
waitForProcessDeath(Process p,
long timeout)
Waits the specified timeout for the process to die
|
static File |
whichExec(String exec)
Searches the path for the specified executable
|
closeStreams, getCommandline, getEnvironment, getEnvironmentVariables, getExitValue, getProcEnvironment, getWorkingDirectory, isFailure, isFailure, killedProcess, launch, runCommand, setAntRun, setCommandline, setEnvironment, setExitValue, setNewenvironment, setSpawn, setStreamHandler, setVMLauncher, setWorkingDirectory, spawn, toString, waitForpublic static void sleepTightInSeconds(long timeoutInSeconds)
timeoutInSeconds - Sleep time in seconds.RuntimeException - wrapping an InterruptedException if one gets thrownpublic static void sleepTight(long timeout)
timeout - the amout of time to sleepRuntimeException - wrapping an InterruptedException if one gets thrownpublic Process asyncSpawn() throws IOException
IOExceptionpublic int execute()
throws IOException
execute in class org.apache.tools.ant.taskdefs.ExecuteIOExceptionpublic static boolean isAlive(Process p)
public static int waitForProcessDeath(Process p, long timeout)
public static int killProcess(Process process)
public static File whichExec(String exec)
exec - the executable name to search forpublic void setLibraryPath(String newLibraryPath)
protected void setActualExecuteEnvironment()
Copyright © 2012. All Rights Reserved.