Skip to content

Commit

Permalink
Refs #10843. Adds IsExiting() call to SignalHandling.
Browse files Browse the repository at this point in the history
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 b047371
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mythtv/libs/libmythbase/signalhandling.h
Expand Up @@ -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);

Expand Down

0 comments on commit b047371

Please sign in to comment.