From c13090b47294b96424c46302ce993ec80b37706c Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sat, 31 Dec 2011 02:10:06 +0000 Subject: [PATCH] Use a Daemon object for process locking --- source/lib/DownloadDispatcher/Main.class.php | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 source/lib/DownloadDispatcher/Main.class.php diff --git a/source/lib/DownloadDispatcher/Main.class.php b/source/lib/DownloadDispatcher/Main.class.php new file mode 100644 index 0000000..8334745 --- /dev/null +++ b/source/lib/DownloadDispatcher/Main.class.php @@ -0,0 +1,25 @@ +daemon = new DownloadDispatcher_Daemon($this->config); + + } catch (SihnonFramework_Exception_AlreadyRunning $e) { + DownloadDispatcher_LogEntry::error($this->log, "Another instance is already running, exiting this process now."); + exit(0); + } + } + +} + +?> \ No newline at end of file