frysk.proc
Class Proc

java.lang.Object
  extended by frysk.proc.Proc
All Implemented Interfaces:
Comparable
Direct Known Subclasses:
DeadProc, DummyProc, LinuxPtraceProc

public abstract class Proc
extends Object
implements Comparable

A UNIX Process, containing tasks, memory, ...


Nested Class Summary
 class Proc.ObservableXXX
          XXX: Temporary until .observable's are converted to .requestAddObserver.
 
Field Summary
 Proc.ObservableXXX observableAttachedXXX
          XXX: Clients should look at the updateRemoved() observer and use that to determine when they are attached or detached.
 Proc.ObservableXXX observableDetachedXXX
          XXX: Clients should look at the updateRemoved() observer and use that to determine when they are attached or detached.
 Proc parent
          XXX: This should not be public.
 
Method Summary
 void add(Proc child)
          Add Proc as a new child XXX: This should not be public.
 int compareTo(Object o)
           
abstract  Auxv[] getAuxv()
          The Process Auxiliary Vector.
 LinkedList getChildren()
          Get the children as an array.
abstract  String[] getCmdLine()
          Return the Proc's command line argument list
abstract  String getCommand()
          Return the basename of the program that this process is running.
abstract  SysRootFile getExeFile()
          Return the SysRoot path of the program that this process is running.
abstract  int getGID()
          Return the GID of the Proc.
 Host getHost()
          Return the Proc's Host.
abstract  Task getMainTask()
           
 MemoryMap getMap(long address)
           
abstract  MemoryMap[] getMaps()
           
 Proc getParent()
           
 int getPid()
           
 LinkedList getTasks()
          Return this Proc's Task's as a list.
abstract  int getUID()
          Return the UID of the Proc.
 void remove(Proc child)
          Remove Proc from this processes children.
 void requestAbandon()
          Request that the Proc be forcefully detached.
 void requestAbandonAndRunEvent(Event e)
          Request that the Proc be forcefully detached.
 void requestKill()
          killRequest handles killing off processes that either the commandline or GUI have designated need to be removed from the CPU queue.
 void sendRefresh()
          XXX: Should not be public; should be frysk.proc.live private.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parent

public Proc parent
XXX: This should not be public.


observableAttachedXXX

public Proc.ObservableXXX observableAttachedXXX
XXX: Clients should look at the updateRemoved() observer and use that to determine when they are attached or detached.


observableDetachedXXX

public Proc.ObservableXXX observableDetachedXXX
XXX: Clients should look at the updateRemoved() observer and use that to determine when they are attached or detached.

Method Detail

getParent

public Proc getParent()

getHost

public Host getHost()
Return the Proc's Host.


getPid

public int getPid()

getCommand

public abstract String getCommand()
Return the basename of the program that this process is running.


getExeFile

public abstract SysRootFile getExeFile()
Return the SysRoot path of the program that this process is running.


getUID

public abstract int getUID()
Return the UID of the Proc.


getGID

public abstract int getGID()
Return the GID of the Proc.


getMainTask

public abstract Task getMainTask()
Returns:
The main task for this process XXX: Rather than getting the main task and manipulating that, it should be possible to instead manipulate the proc - for instance asking the proc to notify of fork/exec/clone events. At present this is implemented by ProcBlockAction.

getCmdLine

public abstract String[] getCmdLine()
Return the Proc's command line argument list


getMaps

public abstract MemoryMap[] getMaps()

getMap

public MemoryMap getMap(long address)

sendRefresh

public void sendRefresh()
XXX: Should not be public; should be frysk.proc.live private.


requestKill

public void requestKill()
killRequest handles killing off processes that either the commandline or GUI have designated need to be removed from the CPU queue.


requestAbandon

public void requestAbandon()
Request that the Proc be forcefully detached. Quickly.


requestAbandonAndRunEvent

public void requestAbandonAndRunEvent(Event e)
Request that the Proc be forcefully detached. Upon detach run the given event.

Parameters:
e - The event to run upon successful detach.

add

public void add(Proc child)
Add Proc as a new child XXX: This should not be public.


remove

public void remove(Proc child)
Remove Proc from this processes children. XXX: This should not be public.


getChildren

public LinkedList getChildren()
Get the children as an array.


getTasks

public LinkedList getTasks()
Return this Proc's Task's as a list.


getAuxv

public abstract Auxv[] getAuxv()
The Process Auxiliary Vector.


toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable