frysk.proc.live
Class LinuxPtraceProc

java.lang.Object
  extended by frysk.proc.Proc
      extended by frysk.proc.live.LinuxPtraceProc
All Implemented Interfaces:
Comparable

public class LinuxPtraceProc
extends Proc

A Linux Proc tracked using PTRACE.


Nested Class Summary
 
Nested classes/interfaces inherited from class frysk.proc.Proc
Proc.ObservableXXX
 
Field Summary
 
Fields inherited from class frysk.proc.Proc
observableAttachedXXX, observableDetachedXXX, parent
 
Constructor Summary
LinuxPtraceProc(Host host, Proc parent, ProcessIdentifier pid, Stat stat)
          Create a new detached process.
LinuxPtraceProc(Task task, ProcessIdentifier fork)
          Create a new, definitely attached, definitely running fork of Task.
 
Method Summary
 Auxv[] getAuxv()
          The Process Auxiliary Vector.
 String[] getCmdLine()
          Return the Proc's command line argument list
 String getCommand()
          Return the basename of the program that this process is running.
 SysRootFile getExeFile()
          Return the SysRoot path of the program that this process is running.
 int getGID()
          Return the GID of the Proc.
 Task getMainTask()
           
 MemoryMap[] getMaps()
           
 Stat getStat()
          If it hasn't already been read, read the stat structure.
 int getUID()
          Return the UID of the Proc.
 void sendRefresh()
          Refresh the Proc.
 
Methods inherited from class frysk.proc.Proc
add, compareTo, getChildren, getHost, getMap, getParent, getPid, getTasks, remove, requestAbandon, requestAbandonAndRunEvent, requestKill, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinuxPtraceProc

public LinuxPtraceProc(Host host,
                       Proc parent,
                       ProcessIdentifier pid,
                       Stat stat)
Create a new detached process. RUNNING makes no sense here. Since PARENT could be NULL, also explicitly pass in the host.


LinuxPtraceProc

public LinuxPtraceProc(Task task,
                       ProcessIdentifier fork)
Create a new, definitely attached, definitely running fork of Task.

Method Detail

getMainTask

public Task getMainTask()
Specified by:
getMainTask in class Proc
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.

getAuxv

public Auxv[] getAuxv()
Description copied from class: Proc
The Process Auxiliary Vector.

Specified by:
getAuxv in class Proc

getMaps

public MemoryMap[] getMaps()
Specified by:
getMaps in class Proc

getCmdLine

public String[] getCmdLine()
Description copied from class: Proc
Return the Proc's command line argument list

Specified by:
getCmdLine in class Proc

getUID

public int getUID()
Description copied from class: Proc
Return the UID of the Proc.

Specified by:
getUID in class Proc

getGID

public int getGID()
Description copied from class: Proc
Return the GID of the Proc.

Specified by:
getGID in class Proc

getExeFile

public SysRootFile getExeFile()
Description copied from class: Proc
Return the SysRoot path of the program that this process is running.

Specified by:
getExeFile in class Proc

getStat

public Stat getStat()
If it hasn't already been read, read the stat structure.


getCommand

public String getCommand()
Description copied from class: Proc
Return the basename of the program that this process is running.

Specified by:
getCommand in class Proc

sendRefresh

public void sendRefresh()
Refresh the Proc.

Overrides:
sendRefresh in class Proc