38 #include <QtCore/QDateTime>
42 using namespace AlarmNotifications;
48 static Daemon global_instance;
49 return global_instance;
51 catch ( std::exception& e )
53 ExceptionHandler ( e,
"while starting the AlarmNotifications daemon.",
true );
74 std::cout << QDateTime::currentDateTime().toString ( QString::fromUtf8 (
"dd. MMM yyyy hh:mm:ss" ) ).toStdString() <<
": Starting AlarmNotifications daemon..." << std::endl;
79 std::cout << QDateTime::currentDateTime().toString ( QString::fromUtf8 (
"dd. MMM yyyy hh:mm:ss" ) ).toStdString() <<
": Stopping AlarmNotifications daemon..." << std::endl;
89 std::cout << QDateTime::currentDateTime().toString ( QString::fromUtf8 (
"dd. MMM yyyy hh:mm:ss" ) ).toStdString() <<
": ";
91 std::cout <<
"No alarms active.";
94 std::cout << std::endl;
97 catch ( std::exception& e )
99 ExceptionHandler ( e,
"while running the AlarmNotifications daemon.",
true );
109 if ( signum != SIGINT && signum != SIGHUP && signum != SIGQUIT && signum != SIGUSR1 && signum != SIGUSR2 && signum != SIGTERM )