From dd8bff318201a8bea5d2d76f1d15d872220342fe Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 30 Nov 2006 18:53:04 +0000 Subject: [PATCH] Fix for #1998 - the problem occurred when you start the scheduler more than once. --- campcaster/src/products/scheduler/src/XmlRpcDaemon.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/campcaster/src/products/scheduler/src/XmlRpcDaemon.cxx b/campcaster/src/products/scheduler/src/XmlRpcDaemon.cxx index a7d51a43c..c6f6f4247 100644 --- a/campcaster/src/products/scheduler/src/XmlRpcDaemon.cxx +++ b/campcaster/src/products/scheduler/src/XmlRpcDaemon.cxx @@ -274,6 +274,11 @@ XmlRpcDaemon :: start (void) throw (std::logic_error) { checkForConfiguration(); + if (isRunning()) { + std::cout << "Campcaster Scheduler is already running.\n"; + return; + } + if (background) { if (!daemonize()) { // return if we're the parent process that should not continue @@ -318,7 +323,7 @@ XmlRpcDaemon :: isRunning (void) throw (std::logic_error) pid = 0; } } - + //std::cerr << "XmlRpcDaemon::isRunning - pid is " << pid << "\n"; return pid; }