hudson.util
Class ProcessTree.UnixProcess

java.lang.Object
  extended by hudson.util.ProcessTree.OSProcess
      extended by hudson.util.ProcessTree.UnixProcess
All Implemented Interfaces:
ProcessTreeRemoting.IOSProcess, Serializable
Enclosing class:
ProcessTree

public abstract class ProcessTree.UnixProcess
extends ProcessTree.OSProcess

A process.

See Also:
Serialized Form

Constructor Summary
protected ProcessTree.UnixProcess(int pid)
           
 
Method Summary
abstract  List<String> getArguments()
          Obtains the argument list of this process.
protected  File getFile(String relativePath)
           
 void kill()
          Tries to kill this process.
 void killRecursively()
          Kills this process and all the descendants.
 
Methods inherited from class hudson.util.ProcessTree.OSProcess
act, getChildren, getEnvironmentVariables, getParent, getPid, hasMatchingEnvVars
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessTree.UnixProcess

protected ProcessTree.UnixProcess(int pid)
Method Detail

getFile

protected final File getFile(String relativePath)

kill

public void kill()
          throws InterruptedException
Tries to kill this process.

Specified by:
kill in interface ProcessTreeRemoting.IOSProcess
Specified by:
kill in class ProcessTree.OSProcess
Throws:
InterruptedException

killRecursively

public void killRecursively()
                     throws InterruptedException
Description copied from class: ProcessTree.OSProcess
Kills this process and all the descendants.

Note that the notion of "descendants" is somewhat vague, in the presence of such things like daemons. On platforms where the recursive operation is not supported, this just kills the current process.

Specified by:
killRecursively in interface ProcessTreeRemoting.IOSProcess
Specified by:
killRecursively in class ProcessTree.OSProcess
Throws:
InterruptedException

getArguments

public abstract List<String> getArguments()
Obtains the argument list of this process.

Specified by:
getArguments in interface ProcessTreeRemoting.IOSProcess
Specified by:
getArguments in class ProcessTree.OSProcess
Returns:
empty list if failed (for example because the process is already dead, or the permission was denied.)


Copyright © 2004-2013. All Rights Reserved.