frysk.gui.monitor
Class GuiProc

java.lang.Object
  extended by frysk.gui.monitor.GuiObject
      extended by frysk.gui.monitor.GuiCoreObjectWrapper
          extended by frysk.gui.monitor.GuiProc
All Implemented Interfaces:
SaveableXXX

public class GuiProc
extends GuiCoreObjectWrapper

TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates


Nested Class Summary
static class GuiProc.GuiProcFactory
           
 
Field Summary
private  String executableName
           
private  String executablePath
           
 GuiObservable executablePathChanged
           
private  String niceExecutablePath
           
static String PATH_NOT_FOUND
           
private  Proc proc
           
 
Fields inherited from class frysk.gui.monitor.GuiCoreObjectWrapper
objectDiedObservable
 
Fields inherited from class frysk.gui.monitor.GuiObject
propertiesChanged
 
Constructor Summary
GuiProc(Proc proc)
           
 
Method Summary
 String getExecutableName()
          Tries to call getExe() on the proc.
 String getFullExecutablePath()
           
 String getNiceExecutablePath()
          The executable path of a proc might be mangled with things like '(deleted)' or "#prelink#" if the executable has been deleted or the link changed.
 Proc getProc()
           
 boolean isOwned()
          Returns wether this user owns this process or not.
private  void setExecutablePath()
           
private  void setNiceExecutablePath()
           
 
Methods inherited from class frysk.gui.monitor.GuiCoreObjectWrapper
isDead, objectDied
 
Methods inherited from class frysk.gui.monitor.GuiObject
dontSaveObject, doSaveObject, getCopy, getName, getSummary, getToolTip, load, save, setName, setSummay, setToolTip, shouldSaveObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PATH_NOT_FOUND

public static final String PATH_NOT_FOUND
See Also:
Constant Field Values

proc

private Proc proc

executableName

private String executableName

executablePath

private String executablePath

niceExecutablePath

private String niceExecutablePath

executablePathChanged

public GuiObservable executablePathChanged
Constructor Detail

GuiProc

public GuiProc(Proc proc)
Method Detail

getProc

public Proc getProc()

setNiceExecutablePath

private void setNiceExecutablePath()

getNiceExecutablePath

public String getNiceExecutablePath()
The executable path of a proc might be mangled with things like '(deleted)' or "#prelink#" if the executable has been deleted or the link changed. This function cleans this out and returns the clean path.

Returns:

setExecutablePath

private void setExecutablePath()

isOwned

public boolean isOwned()
Returns wether this user owns this process or not. - Checks uid and * gid. - Checks if the given process is this frysk process if so returns false. - Also checks that the user has acces to /pro/exe if not false is returned. - Checks if this process is the init process, return false if so.

Returns:
boolean; true of the user owns this process, and can debug it false otherwise;

getFullExecutablePath

public String getFullExecutablePath()

getExecutableName

public String getExecutableName()
Tries to call getExe() on the proc. If that fails, then getCmmd[0] is used.