com.googlecode.android_scripting
Class Exec
java.lang.Object
com.googlecode.android_scripting.Exec
public class Exec
- extends java.lang.Object
Tools for executing commands.
|
Constructor Summary |
Exec()
|
|
Method Summary |
static java.io.FileDescriptor |
createSubprocess(java.lang.String command,
java.lang.String[] arguments,
java.lang.String[] environmentVariables,
java.lang.String workingDirectory)
|
static java.io.FileDescriptor |
createSubprocess(java.lang.String command,
java.lang.String[] arguments,
java.lang.String[] environmentVariables,
java.lang.String workingDirectory,
int[] processId)
|
static void |
setPtyWindowSize(java.io.FileDescriptor fd,
int row,
int col,
int xpixel,
int ypixel)
|
static int |
waitFor(int processId)
Causes the calling thread to wait for the process associated with the receiver to finish
executing. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Exec
public Exec()
createSubprocess
public static java.io.FileDescriptor createSubprocess(java.lang.String command,
java.lang.String[] arguments,
java.lang.String[] environmentVariables,
java.lang.String workingDirectory)
- Parameters:
cmd - The command to executearg0 - The first argument to the command, may be nullarg1 - the second argument to the command, may be null
- Returns:
- the file descriptor of the started process.
createSubprocess
public static java.io.FileDescriptor createSubprocess(java.lang.String command,
java.lang.String[] arguments,
java.lang.String[] environmentVariables,
java.lang.String workingDirectory,
int[] processId)
- Parameters:
cmd - The command to executearguments - Array of arguments, may be nullenvironmentVariables - Array of environment variables, may be nullprocessId - A one-element array to which the process ID of the started process will be written.
- Returns:
- the file descriptor of the opened process's psuedo-terminal.
setPtyWindowSize
public static void setPtyWindowSize(java.io.FileDescriptor fd,
int row,
int col,
int xpixel,
int ypixel)
waitFor
public static int waitFor(int processId)
- Causes the calling thread to wait for the process associated with the receiver to finish
executing.
- Returns:
- The exit value of the Process being waited on