diff options
Diffstat (limited to 'node/Service.hpp')
-rw-r--r-- | node/Service.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/node/Service.hpp b/node/Service.hpp index c8b729c7..0b00d81d 100644 --- a/node/Service.hpp +++ b/node/Service.hpp @@ -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; |