Skip to content

Commit

Permalink
More windows-related fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Beirdo committed Oct 1, 2012
1 parent 0c22b92 commit f1d851b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions mythtv/libs/libmythbase/signalhandling.cpp
Expand Up @@ -63,6 +63,7 @@ SignalHandler::SignalHandler(QList<int> &signallist, QObject *parent) :
s_exit_program = false; // set here due to "C++ static initializer madness"
sig_str_init();

#ifndef _WIN32
m_sigStack = new char[SIGSTKSZ];
stack_t stack;
stack.ss_sp = m_sigStack;
Expand All @@ -76,15 +77,14 @@ SignalHandler::SignalHandler(QList<int> &signallist, QObject *parent) :
delete [] m_sigStack;
m_sigStack = NULL;
}
#endif

if (s_defaultHandlerList.isEmpty())
s_defaultHandlerList << SIGINT << SIGTERM << SIGSEGV << SIGABRT
<< SIGFPE << SIGILL;
#ifndef _WIN32
<< SIGBUS
#endif
<< SIGFPE << SIGILL << SIGRTMIN;
s_defaultHandlerList << SIGBUS << SIGRTMIN;

#ifndef _WIN32
if (::socketpair(AF_UNIX, SOCK_STREAM, 0, sigFd))
{
cerr << "Couldn't create socketpair" << endl;
Expand Down Expand Up @@ -204,6 +204,10 @@ void SignalHandler::signalHandler(int signum, siginfo_t *info, void *context)
{
SignalInfo signalInfo;

#ifdef _WIN32
info = NULL;
#endif

(void)context;
signalInfo.signum = signum;
signalInfo.code = (info ? info->si_code : 0);
Expand Down

0 comments on commit f1d851b

Please sign in to comment.