Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

You MUST use SignalHandler *after* initializing the app

  • Loading branch information...
commit 2cc4bdc341d015d0324b98172447a0a0e9a9cbfa 1 parent 8e19503
@Beirdo Beirdo authored
View
2  mythtv/libs/libmythbase/loggingserver.h
@@ -129,7 +129,7 @@ typedef QList<LogMessage *> LogMessageList;
/// ZeroMQ.
class LogServerThread : public QObject, public MThread
{
- Q_OBJECT;
+ Q_OBJECT
friend void logSighup(int signum);
public:
View
16 mythtv/programs/mythfrontend/main.cpp
@@ -1487,14 +1487,6 @@ int main(int argc, char **argv)
CleanupGuard callCleanup(cleanup);
-#ifndef _WIN32
- QList<int> signallist;
- signallist << SIGINT << SIGTERM << SIGSEGV << SIGABRT;
- SignalHandler handler(signallist);
- handler.AddHandler(SIGUSR1, handleSIGUSR1);
- handler.AddHandler(SIGUSR2, handleSIGUSR2);
-#endif
-
#ifdef Q_WS_MACX
// Without this, we can't set focus to any of the CheckBoxSetting, and most
// of the MythPushButton widgets, and they don't use the themed background.
@@ -1503,6 +1495,14 @@ int main(int argc, char **argv)
new QApplication(argc, argv);
QCoreApplication::setApplicationName(MYTH_APPNAME_MYTHFRONTEND);
+#ifndef _WIN32
+ QList<int> signallist;
+ signallist << SIGINT << SIGTERM << SIGSEGV << SIGABRT;
+ SignalHandler handler(signallist);
+ handler.AddHandler(SIGUSR1, handleSIGUSR1);
+ handler.AddHandler(SIGUSR2, handleSIGUSR2);
+#endif
+
int retval;
if ((retval = cmdline.ConfigureLogging()) != GENERIC_EXIT_OK)
return retval;
View
12 mythtv/programs/mythtv-setup/main.cpp
@@ -266,12 +266,6 @@ int main(int argc, char *argv[])
CleanupGuard callCleanup(cleanup);
-#ifndef _WIN32
- QList<int> signallist;
- signallist << SIGINT << SIGTERM << SIGSEGV << SIGABRT;
- SignalHandler handler(signallist);
-#endif
-
#ifdef Q_WS_MACX
// Without this, we can't set focus to any of the CheckBoxSetting, and most
// of the MythPushButton widgets, and they don't use the themed background.
@@ -280,6 +274,12 @@ int main(int argc, char *argv[])
new QApplication(argc, argv, use_display);
QCoreApplication::setApplicationName(MYTH_APPNAME_MYTHTV_SETUP);
+#ifndef _WIN32
+ QList<int> signallist;
+ signallist << SIGINT << SIGTERM << SIGSEGV << SIGABRT;
+ SignalHandler handler(signallist);
+#endif
+
if (cmdline.toBool("display"))
display = cmdline.toString("display");
if (cmdline.toBool("geometry"))
Please sign in to comment.
Something went wrong with that request. Please try again.