summaryrefslogtreecommitdiff
path: root/orkaudio/Daemon.cpp
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2005-11-15 04:19:31 +0000
committerHenri Herscher <henri@oreka.org>2005-11-15 04:19:31 +0000
commit7653151cb08cfa40eec22e7aac3068b009207bc8 (patch)
treec41e2f1bbf73001791248fb18d842a01978ad0e8 /orkaudio/Daemon.cpp
parent61cb474c09cce3a667774c4f4eef093c2025f324 (diff)
Improvements in the shutdown procedure (NT service does not crash on exit anymore, give two seconds to threads to exit properly).
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@44 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/Daemon.cpp')
-rw-r--r--orkaudio/Daemon.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/orkaudio/Daemon.cpp b/orkaudio/Daemon.cpp
index f834a7a..ed7e5a6 100644
--- a/orkaudio/Daemon.cpp
+++ b/orkaudio/Daemon.cpp
@@ -57,6 +57,8 @@ void Daemon::Initialize(CStdString serviceName, DaemonHandler runHandler, Daemon
m_runHandler = runHandler;
m_stopHandler = stopHandler;
m_serviceName = serviceName;
+
+ m_stopping = false;
}
void Daemon::Start()
@@ -139,6 +141,7 @@ void Daemon::Run()
void Daemon::Stop()
{
+ m_stopping = true;
m_stopHandler();
}
@@ -192,3 +195,8 @@ void Daemon::Uninstall()
#endif
}
+bool Daemon::IsStopping()
+{
+ return m_stopping;
+}
+