author | zecke <zecke> | 2002-10-12 00:40:14 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-12 00:40:14 (UTC) |
commit | 39b88e5809e50a4951869434b8015c55265fc495 (patch) (unidiff) | |
tree | ad444833b2c9fd0c672c7dfdcc99b3a33ace8b8d | |
parent | 0a3ffe7e5657bed4cb77d9bc23457755e2d02591 (diff) | |
download | opie-39b88e5809e50a4951869434b8015c55265fc495.zip opie-39b88e5809e50a4951869434b8015c55265fc495.tar.gz opie-39b88e5809e50a4951869434b8015c55265fc495.tar.bz2 |
No does not have any public c'tor
-rw-r--r-- | noncore/apps/opie-console/procctl.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/procctl.h | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/procctl.cpp b/noncore/apps/opie-console/procctl.cpp index 6839a84..ff6bea8 100644 --- a/noncore/apps/opie-console/procctl.cpp +++ b/noncore/apps/opie-console/procctl.cpp | |||
@@ -6,12 +6,18 @@ | |||
6 | #include "procctl.h" | 6 | #include "procctl.h" |
7 | 7 | ||
8 | ProcContainer *ProcCtl::m_last = 0; | 8 | ProcContainer *ProcCtl::m_last = 0; |
9 | ProcCtl* ProcCtl::m_self = 0; | ||
9 | 10 | ||
10 | ProcCtl::ProcCtl() { | 11 | ProcCtl::ProcCtl() { |
11 | signal( SIGCHLD, signal_handler ); | 12 | signal( SIGCHLD, signal_handler ); |
12 | } | 13 | } |
13 | ProcCtl::~ProcCtl() { | 14 | ProcCtl::~ProcCtl() { |
14 | } | 15 | } |
16 | ProcCtl* ProcCtl::self() { | ||
17 | if (!m_self ) { | ||
18 | m_self = new ProcCtl; | ||
19 | } | ||
20 | } | ||
15 | void ProcCtl::add(pid_t pi, int fd ) { | 21 | void ProcCtl::add(pid_t pi, int fd ) { |
16 | ProcContainer * con = new ProcContainer; | 22 | ProcContainer * con = new ProcContainer; |
17 | //memset(con, 0, sizeof(con) ); | 23 | //memset(con, 0, sizeof(con) ); |
diff --git a/noncore/apps/opie-console/procctl.h b/noncore/apps/opie-console/procctl.h index e2161f3..5e96423 100644 --- a/noncore/apps/opie-console/procctl.h +++ b/noncore/apps/opie-console/procctl.h | |||
@@ -17,10 +17,12 @@ struct ProcContainer { | |||
17 | }; | 17 | }; |
18 | 18 | ||
19 | class ProcCtl { | 19 | class ProcCtl { |
20 | public: | 20 | private: |
21 | ProcCtl(); | 21 | ProcCtl(); |
22 | public: | ||
22 | ~ProcCtl(); | 23 | ~ProcCtl(); |
23 | 24 | ||
25 | ProcCtl* self(); | ||
24 | int status(pid_t)const; | 26 | int status(pid_t)const; |
25 | void add( pid_t, int fd ); | 27 | void add( pid_t, int fd ); |
26 | void remove( pid_t ); | 28 | void remove( pid_t ); |
@@ -28,6 +30,7 @@ public: | |||
28 | private: | 30 | private: |
29 | static void signal_handler(int); | 31 | static void signal_handler(int); |
30 | static ProcContainer* m_last; | 32 | static ProcContainer* m_last; |
33 | static ProcCtl* m_self; | ||
31 | }; | 34 | }; |
32 | 35 | ||
33 | #endif | 36 | #endif |