org.openqa.selenium
Class ProcessUtils

java.lang.Object
  extended by org.openqa.selenium.ProcessUtils

public class ProcessUtils
extends java.lang.Object


Nested Class Summary
static class ProcessUtils.ProcessStillAliveException
           
 
Constructor Summary
ProcessUtils()
           
 
Method Summary
static int getProcessId(java.lang.Process p)
          retrieves the pid
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
 

Constructor Detail

ProcessUtils

public ProcessUtils()
Method Detail

waitForProcessDeath

public static int waitForProcessDeath(java.lang.Process p,
                                      long timeout)
Waits the specified timeout for the process to die


killProcess

public static int killProcess(java.lang.Process process)
Forcibly kills a process, using OS tools like "kill" as a last resort


getProcessId

public static int getProcessId(java.lang.Process p)
retrieves the pid


kill9

public static void kill9(java.lang.Integer pid)
                  throws java.io.IOException,
                         java.lang.InterruptedException
runs "kill -9" on the specified pid

Throws:
java.io.IOException
java.lang.InterruptedException

kill9

public static void kill9(java.lang.Process p)
                  throws java.io.IOException,
                         java.lang.InterruptedException
runs "kill -9" on the specified process

Throws:
java.io.IOException
java.lang.InterruptedException


Copyright © 2010. All Rights Reserved.