Fix for #1998 - the problem occurred when you start the scheduler more than once.

This commit is contained in:
paul 2006-11-30 18:53:04 +00:00
parent 86243e1d55
commit dd8bff3182
1 changed files with 6 additions and 1 deletions

View File

@ -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;
}