Permalink
Browse files

Refs #10843. Adds IsExiting() call to SignalHandling.

This allows programs to exit on a signal when they are not in qApp->exec().
They just need to call QCoreApplication::processEvents() and then check
this return value and exit if appropriate.
  • Loading branch information...
daniel-kristjansson committed Jun 18, 2012
1 parent 546fdac commit b0473717bdca14e8d4679cda31de17c87b86cd5f
Showing with 2 additions and 0 deletions.
  1. +2 −0 mythtv/libs/libmythbase/signalhandling.h
@@ -23,6 +23,8 @@ class MBASE_PUBLIC SignalHandler: public QObject
void AddHandler(int signal, void (*handler)(void));
+ static bool IsExiting(void) { return s_exit_program; }
+
// Unix signal handler.
static void signalHandler(int signum);

0 comments on commit b047371

Please sign in to comment.