summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2013-09-07 13:54:54 +0000
committerrandomdan <randomdan@localhost>2013-09-07 13:54:54 +0000
commit90e3e78b1ef6411ef8bb205bc02322ee0b8805a0 (patch)
tree52e7ee7d296220911d63423b7634961af3a3d522
parentAdd signal handler to p2daemon (diff)
downloadproject2-90e3e78b1ef6411ef8bb205bc02322ee0b8805a0.tar.bz2
project2-90e3e78b1ef6411ef8bb205bc02322ee0b8805a0.tar.xz
project2-90e3e78b1ef6411ef8bb205bc02322ee0b8805a0.zip
Explicit daemon destruction in order
Client linking fix
-rw-r--r--project2/daemon/lib/Jamfile.jam1
-rw-r--r--project2/daemon/p2daemonAppEngine.cpp5
-rw-r--r--project2/daemon/p2daemonAppEngine.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/project2/daemon/lib/Jamfile.jam b/project2/daemon/lib/Jamfile.jam
index e028f19..c46ff32 100644
--- a/project2/daemon/lib/Jamfile.jam
+++ b/project2/daemon/lib/Jamfile.jam
@@ -10,6 +10,7 @@ lib p2daemonlib :
<library>../../common//p2common
: :
<include>.
+ <library>../../common//p2common
;
diff --git a/project2/daemon/p2daemonAppEngine.cpp b/project2/daemon/p2daemonAppEngine.cpp
index d00cd1d..cb414c5 100644
--- a/project2/daemon/p2daemonAppEngine.cpp
+++ b/project2/daemon/p2daemonAppEngine.cpp
@@ -19,6 +19,11 @@ DaemonAppEngine::DaemonAppEngine(int argc, char ** argv) :
daemon = DaemonLoader::createNew(daemonType, argc, argv);
}
+DaemonAppEngine::~DaemonAppEngine()
+{
+ daemon.reset();
+}
+
void
DaemonAppEngine::shutdown(int)
{
diff --git a/project2/daemon/p2daemonAppEngine.h b/project2/daemon/p2daemonAppEngine.h
index 48ef572..236bef6 100644
--- a/project2/daemon/p2daemonAppEngine.h
+++ b/project2/daemon/p2daemonAppEngine.h
@@ -8,7 +8,7 @@
class DaemonAppEngine {
public:
DaemonAppEngine(int, char **);
- ~DaemonAppEngine() = default;
+ ~DaemonAppEngine();
void process() const;