Fix for #1998 - the problem occurred when you start the scheduler more than once.
This commit is contained in:
parent
86243e1d55
commit
dd8bff3182
|
@ -274,6 +274,11 @@ XmlRpcDaemon :: start (void) throw (std::logic_error)
|
||||||
{
|
{
|
||||||
checkForConfiguration();
|
checkForConfiguration();
|
||||||
|
|
||||||
|
if (isRunning()) {
|
||||||
|
std::cout << "Campcaster Scheduler is already running.\n";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (background) {
|
if (background) {
|
||||||
if (!daemonize()) {
|
if (!daemonize()) {
|
||||||
// return if we're the parent process that should not continue
|
// return if we're the parent process that should not continue
|
||||||
|
@ -318,7 +323,7 @@ XmlRpcDaemon :: isRunning (void) throw (std::logic_error)
|
||||||
pid = 0;
|
pid = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//std::cerr << "XmlRpcDaemon::isRunning - pid is " << pid << "\n";
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue