This commit is contained in:
Arnout Engelen
2004-09-17 19:22:17 +00:00
parent cd3fce3e54
commit 45e3157f67
7 changed files with 73 additions and 286 deletions

View File

@@ -7,6 +7,8 @@
extern bool tracemode;
void check_all_procs ();
class ConnList
{
public:
@@ -58,6 +60,10 @@ public:
pid = 0;
uid = 0;
}
void check () {
assert (pid >= 0);
assert (uid >= 0);
}
/* TODO free m_name and m_devicename again in constructor */
~Process ()
{
@@ -86,8 +92,25 @@ private:
uid_t uid;
};
class ProcList
{
public:
ProcList (Process * m_val, ProcList * m_next)
{
if (DEBUG)
assert (m_val != NULL);
val = m_val; next = m_next;
}
int size ();
Process * getVal () { return val; }
ProcList * getNext () { return next; }
ProcList * next;
private:
Process * val;
};
Process * getProcess (Connection * connection, char * devicename = NULL);
void do_refresh ();
void refreshconninode ();
void procclean ();