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
commit351984640ce700a273cf317344e5ef32786985ef (patch)
tree52e7ee7d296220911d63423b7634961af3a3d522
parentAdd signal handler to p2daemon (diff)
downloadproject2-351984640ce700a273cf317344e5ef32786985ef.tar.bz2
project2-351984640ce700a273cf317344e5ef32786985ef.tar.xz
project2-351984640ce700a273cf317344e5ef32786985ef.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;