summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/procctl.h
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/procctl.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/procctl.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/procctl.h b/noncore/apps/opie-console/procctl.h
new file mode 100644
index 0000000..e2161f3
--- a/dev/null
+++ b/noncore/apps/opie-console/procctl.h
@@ -0,0 +1,33 @@
+#ifndef OPIE_PROC_CTL_H
+#define OPIE_PROC_CTL_H
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <signal.h>
+
+#include <qmap.h>
+
+
+struct ProcContainer {
+ pid_t pid;
+ int fd;
+ int status;
+ ProcContainer* prev;
+};
+
+class ProcCtl {
+public:
+ ProcCtl();
+ ~ProcCtl();
+
+ int status(pid_t)const;
+ void add( pid_t, int fd );
+ void remove( pid_t );
+ void remove( ProcContainer );
+private:
+ static void signal_handler(int);
+ static ProcContainer* m_last;
+};
+
+#endif