org.openqa.selenium.os
Class ProcessUtils
java.lang.Object
org.openqa.selenium.os.ProcessUtils
public class ProcessUtils
- extends java.lang.Object
Method Summary |
static int |
getProcessId(java.lang.Process p)
|
static void |
kill9(java.lang.Integer pid)
Runs "kill -9" on the specified pid |
static void |
kill9(java.lang.Process p)
Runs "kill -9" on the specified process |
static int |
killProcess(java.lang.Process process)
Forcibly kills a process, using OS tools like "kill" as a last resort |
static int |
waitForProcessDeath(java.lang.Process p,
long timeout)
Waits the specified timeout for the process to die |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProcessUtils
public ProcessUtils()
waitForProcessDeath
public static int waitForProcessDeath(java.lang.Process p,
long timeout)
- Waits the specified timeout for the process to die
- Parameters:
p
- The process to kill.timeout
- How long to wait in milliseconds.
- Returns:
- The exit code of the given process.
killProcess
public static int killProcess(java.lang.Process process)
- Forcibly kills a process, using OS tools like "kill" as a last resort
- Parameters:
process
- The process to kill.
- Returns:
- The exit value of the process.
getProcessId
public static int getProcessId(java.lang.Process p)
- Parameters:
p
- The process to gather the PID of.
- Returns:
- The process's PID
kill9
public static void kill9(java.lang.Integer pid)
throws java.io.IOException,
java.lang.InterruptedException
- Runs "kill -9" on the specified pid
- Parameters:
pid
- The PID of the process to kill.
- Throws:
java.io.IOException
- If unable to kill the process.
java.lang.InterruptedException
- If unable to kill the process.
kill9
public static void kill9(java.lang.Process p)
throws java.io.IOException,
java.lang.InterruptedException
- Runs "kill -9" on the specified process
- Parameters:
p
- The process to kill.
- Throws:
java.io.IOException
- If unable to kill the process.
java.lang.InterruptedException
- If unable to kill the process.
Copyright © 2011. All Rights Reserved.