From 39b88e5809e50a4951869434b8015c55265fc495 Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 12 Oct 2002 00:40:14 +0000 Subject: No does not have any public c'tor --- (limited to 'noncore/apps/opie-console') 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 @@ #include "procctl.h" ProcContainer *ProcCtl::m_last = 0; +ProcCtl* ProcCtl::m_self = 0; ProcCtl::ProcCtl() { signal( SIGCHLD, signal_handler ); } ProcCtl::~ProcCtl() { } +ProcCtl* ProcCtl::self() { + if (!m_self ) { + m_self = new ProcCtl; + } +} void ProcCtl::add(pid_t pi, int fd ) { ProcContainer * con = new ProcContainer; //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 { }; class ProcCtl { -public: +private: ProcCtl(); +public: ~ProcCtl(); + ProcCtl* self(); int status(pid_t)const; void add( pid_t, int fd ); void remove( pid_t ); @@ -28,6 +30,7 @@ public: private: static void signal_handler(int); static ProcContainer* m_last; + static ProcCtl* m_self; }; #endif -- cgit v0.9.0.2