public class CygwinKillHelper extends Object
Constructor and Description |
---|
CygwinKillHelper(hudson.model.TaskListener log,
hudson.model.Node node,
CygwinKillerInstallation tool,
int processPID) |
Modifier and Type | Method and Description |
---|---|
int |
execCommand(String command,
OutputStream stdout,
OutputStream stderr,
String... args)
Executes command with specified arguments.
|
int |
execScript(String script,
OutputStream out,
String... args)
Executes script on the target host.
|
boolean |
isCygwin()
Checks that Cygwin is available on the host.
|
boolean |
kill()
Terminates process by PID, which has been provided in the constructor.
|
public CygwinKillHelper(hudson.model.TaskListener log, hudson.model.Node node, CygwinKillerInstallation tool, int processPID)
public boolean isCygwin() throws InterruptedException
InterruptedException
public int execScript(String script, OutputStream out, String... args) throws IOException, InterruptedException
script
- Script to be executedout
- Output stream, which returns both stderr and stdoutargs
- Script argumentsIOException
InterruptedException
public int execCommand(String command, OutputStream stdout, OutputStream stderr, String... args) throws IOException, InterruptedException
command
- Command to be executedstdout
- Output stream for STDOUTstderr
- Output stream for STDERRargs
- Arguments to be passedIOException
InterruptedException
- Execution has been interruptedpublic boolean kill() throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2016–2018. All rights reserved.