MythTV  master
Public Slots | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
SignalHandler Class Reference

A container object to handle UNIX signals in the Qt space correctly. More...

#include <signalhandling.h>

Inheritance diagram for SignalHandler:
Inheritance graph
[legend]
Collaboration diagram for SignalHandler:
Collaboration graph
[legend]

Public Slots

void handleSignal (void)
 

Static Public Member Functions

static void Init (QList< int > &signallist, QObject *parent=nullptr)
 
static void Done (void)
 
static void SetHandler (int signum, SigHandlerFunc handler)
 
static bool IsExiting (void)
 
static void signalHandler (int signum, siginfo_t *info, void *context)
 

Private Member Functions

 SignalHandler (QList< int > &signallist, QObject *parent)
 
 ~SignalHandler ()
 
void SetHandlerPrivate (int signum, SigHandlerFunc handler)
 

Private Attributes

QSocketNotifier * m_notifier {nullptr}
 
char * m_sigStack {nullptr}
 
QMutex m_sigMapLock
 
QMap< int, SigHandlerFuncm_sigMap
 

Static Private Attributes

static int s_sigFd [2]
 
static volatile bool s_exit_program = false
 
static QList< int > s_defaultHandlerList
 
static QMutex s_singletonLock
 
static SignalHandlers_singleton
 

Detailed Description

A container object to handle UNIX signals in the Qt space correctly.

Definition at line 25 of file signalhandling.h.

Constructor & Destructor Documentation

◆ SignalHandler()

SignalHandler::SignalHandler ( QList< int > &  signallist,
QObject *  parent 
)
private

Definition at line 60 of file signalhandling.cpp.

Referenced by Init().

◆ ~SignalHandler()

SignalHandler::~SignalHandler ( )
private

Definition at line 114 of file signalhandling.cpp.

Member Function Documentation

◆ Init()

void SignalHandler::Init ( QList< int > &  signallist,
QObject *  parent = nullptr 
)
static

Definition at line 138 of file signalhandling.cpp.

Referenced by main().

◆ Done()

void SignalHandler::Done ( void  )
static

Definition at line 145 of file signalhandling.cpp.

Referenced by cleanup(), and main().

◆ SetHandler()

void SignalHandler::SetHandler ( int  signum,
SigHandlerFunc  handler 
)
static

Definition at line 152 of file signalhandling.cpp.

Referenced by add_open_xv_port(), del_open_xv_port(), and main().

◆ IsExiting()

static bool SignalHandler::IsExiting ( void  )
inlinestatic

Definition at line 35 of file signalhandling.h.

Referenced by TV::PlaybackLoop().

◆ signalHandler()

void SignalHandler::signalHandler ( int  signum,
siginfo_t info,
void *  context 
)
static

Definition at line 205 of file signalhandling.cpp.

Referenced by SetHandlerPrivate().

◆ handleSignal

void SignalHandler::handleSignal ( void  )
slot

Definition at line 287 of file signalhandling.cpp.

Referenced by SignalHandler().

◆ SetHandlerPrivate()

void SignalHandler::SetHandlerPrivate ( int  signum,
SigHandlerFunc  handler 
)
private

Definition at line 159 of file signalhandling.cpp.

Referenced by SetHandler(), and SignalHandler().

Member Data Documentation

◆ s_sigFd

int SignalHandler::s_sigFd
staticprivate

Definition at line 50 of file signalhandling.h.

Referenced by handleSignal(), signalHandler(), SignalHandler(), and ~SignalHandler().

◆ s_exit_program

volatile bool SignalHandler::s_exit_program = false
staticprivate

Definition at line 51 of file signalhandling.h.

Referenced by handleSignal(), signalHandler(), and SignalHandler().

◆ m_notifier

QSocketNotifier* SignalHandler::m_notifier {nullptr}
private

Definition at line 52 of file signalhandling.h.

Referenced by handleSignal(), SignalHandler(), and ~SignalHandler().

◆ m_sigStack

char* SignalHandler::m_sigStack {nullptr}
private

Definition at line 53 of file signalhandling.h.

Referenced by SetHandlerPrivate(), and SignalHandler().

◆ m_sigMapLock

QMutex SignalHandler::m_sigMapLock
private

Definition at line 55 of file signalhandling.h.

Referenced by handleSignal(), SetHandlerPrivate(), and ~SignalHandler().

◆ m_sigMap

QMap<int, SigHandlerFunc> SignalHandler::m_sigMap
private

Definition at line 56 of file signalhandling.h.

Referenced by handleSignal(), SetHandlerPrivate(), and ~SignalHandler().

◆ s_defaultHandlerList

QList< int > SignalHandler::s_defaultHandlerList
staticprivate

Definition at line 57 of file signalhandling.h.

Referenced by SignalHandler().

◆ s_singletonLock

QMutex SignalHandler::s_singletonLock
staticprivate

Definition at line 59 of file signalhandling.h.

Referenced by Done(), Init(), and SetHandler().

◆ s_singleton

SignalHandler * SignalHandler::s_singleton
staticprivate

Definition at line 60 of file signalhandling.h.

Referenced by Done(), Init(), SetHandler(), and ~SignalHandler().


The documentation for this class was generated from the following files: