CLI debugging, got rid of nasty old Thread class and replaced with newer cleaner portable idiom.

This commit is contained in:
Adam Ierymenko 2013-08-05 16:06:16 -04:00
parent 3368330b77
commit a7c4cbe53a
17 changed files with 141 additions and 303 deletions

View file

@ -60,7 +60,7 @@ class RuntimeEnvironment;
* logged via the standard Logger instance. If the subprocess dies, an
* attempt is made to restart it every second.
*/
class Service : protected Thread
class Service
{
public:
/**
@ -78,7 +78,7 @@ public:
void (*handler)(void *,Service &,const Dictionary &),
void *arg);
virtual ~Service();
~Service();
/**
* Send a message to service subprocess
@ -106,12 +106,15 @@ public:
return (_pid > 0);
}
protected:
virtual void main()
/**
* Thread main method; do not call elsewhere
*/
void threadMain()
throw();
private:
const RuntimeEnvironment *_r;
Thread<Service> _thread;
std::string _path;
std::string _name;
void *_arg;