Package com.yahoo.system.execution
Class ProcessExecutor
java.lang.Object
com.yahoo.system.execution.ProcessExecutor
Configurable system command executor that captures stdout and stderr.
- Author:
- gjoranv, bjorncs
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionConvenience method to execute a process with no input data.Executes the given command synchronously.
-
Field Details
-
timeoutSeconds
public final int timeoutSeconds
-
-
Method Details
-
execute
Convenience method to execute a process with no input data. Seeexecute(String, String)
for details.- Throws:
IOException
-
execute
Executes the given command synchronously.- Parameters:
command
- The command to execute.processInput
- Input provided to the process.- Returns:
- The result of the execution, or empty if the process does not terminate within the timeout set for this executor.
- Throws:
IOException
- if the process execution failed.
-