Skip to content

Commit

Permalink
Restore hooks to catch SIGHUP.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdude42 committed Dec 30, 2018
1 parent 25f945b commit 96eb89a
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mythtv/programs/mythbackend/main.cpp
Expand Up @@ -28,6 +28,7 @@
#include "mythmiscutil.h"
#include "storagegroup.h"
#include "mediaserver.h"
#include "loggingserver.h"
#include "mythlogging.h"
#include "mythversion.h"
#include "programinfo.h"
Expand Down Expand Up @@ -120,6 +121,7 @@ int main(int argc, char **argv)
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

gContext = new MythContext(MYTH_BINARY_VERSION);
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythccextractor/main.cpp
Expand Up @@ -19,6 +19,7 @@ using namespace std;
#include "ringbuffer.h"
#include "exitcodes.h"
#include "signalhandling.h"
#include "loggingserver.h"
#include "cleanupguard.h"

namespace {
Expand Down Expand Up @@ -145,6 +146,7 @@ int main(int argc, char *argv[])
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

gContext = new MythContext(MYTH_BINARY_VERSION);
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythcommflag/main.cpp
Expand Up @@ -38,6 +38,7 @@ using namespace std;
#include "ringbuffer.h"
#include "commandlineparser.h"
#include "mythtranslation.h"
#include "loggingserver.h"
#include "mythlogging.h"
#include "signalhandling.h"
#include "cleanupguard.h"
Expand Down Expand Up @@ -1126,6 +1127,7 @@ int main(int argc, char *argv[])
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

gContext = new MythContext(MYTH_BINARY_VERSION);
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythfilldatabase/main.cpp
Expand Up @@ -27,6 +27,7 @@ using namespace std;
#include "videosource.h" // for is_grabber..
#include "dbcheck.h"
#include "mythsystemevent.h"
#include "loggingserver.h"
#include "mythlogging.h"
#include "signalhandling.h"
#include "cleanupguard.h"
Expand Down Expand Up @@ -287,6 +288,7 @@ int main(int argc, char *argv[])
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

gContext = new MythContext(MYTH_BINARY_VERSION);
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythfrontend/main.cpp
Expand Up @@ -53,6 +53,7 @@ using namespace std;
#include "mythsystemevent.h"
#include "hardwareprofile.h"
#include "signalhandling.h"
#include "loggingserver.h"

#include "compat.h" // For SIG* on MinGW
#include "exitcodes.h"
Expand Down Expand Up @@ -1895,6 +1896,7 @@ int main(int argc, char **argv)
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGUSR1, handleSIGUSR1);
SignalHandler::SetHandler(SIGUSR2, handleSIGUSR2);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

int retval;
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythjobqueue/main.cpp
Expand Up @@ -25,6 +25,7 @@
#include "commandlineparser.h"
#include "compat.h"
#include "mythsystemevent.h"
#include "loggingserver.h"
#include "mythlogging.h"
#include "signalhandling.h"
#include "housekeeper.h"
Expand Down Expand Up @@ -98,6 +99,7 @@ int main(int argc, char *argv[])
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

gContext = new MythContext(MYTH_BINARY_VERSION);
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythlcdserver/main.cpp
Expand Up @@ -17,6 +17,7 @@ using namespace std;
#include "exitcodes.h"
#include "mythcontext.h"
#include "mythdbcon.h"
#include "loggingserver.h"
#include "mythlogging.h"
#include "mythversion.h"
#include "tv_play.h"
Expand Down Expand Up @@ -105,6 +106,7 @@ int main(int argc, char **argv)
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

// Get the MythTV context and db hooks
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythmediaserver/main.cpp
Expand Up @@ -17,6 +17,7 @@
#include "exitcodes.h"
#include "dbcheck.h"
#include "mythdbcon.h"
#include "loggingserver.h"
#include "mythlogging.h"
#include "mythversion.h"
#include "mythsystemevent.h"
Expand Down Expand Up @@ -95,6 +96,7 @@ int main(int argc, char *argv[])
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

gContext = new MythContext(MYTH_BINARY_VERSION);
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythmetadatalookup/main.cpp
Expand Up @@ -22,6 +22,7 @@ using namespace std;
#include "mythtranslation.h"
#include "mythconfig.h"
#include "commandlineparser.h"
#include "loggingserver.h"
#include "mythlogging.h"
#include "signalhandling.h"
#include "cleanupguard.h"
Expand Down Expand Up @@ -91,6 +92,7 @@ int main(int argc, char *argv[])
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

gContext = new MythContext(MYTH_BINARY_VERSION);
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythpreviewgen/main.cpp
Expand Up @@ -41,6 +41,7 @@ using namespace std;
#include "previewgenerator.h"
#include "commandlineparser.h"
#include "mythsystemevent.h"
#include "loggingserver.h"
#include "mythlogging.h"
#include "signalhandling.h"
#include "cleanupguard.h"
Expand Down Expand Up @@ -190,6 +191,7 @@ int main(int argc, char **argv)
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

if (signal(SIGPIPE, SIG_IGN) == SIG_ERR)
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythshutdown/main.cpp
Expand Up @@ -18,6 +18,7 @@ using namespace std;
#include "remoteutil.h"
#include "tvremoteutil.h"
#include "compat.h"
#include "loggingserver.h"
#include "mythlogging.h"
#include "commandlineparser.h"
#include "programinfo.h"
Expand Down Expand Up @@ -852,6 +853,7 @@ int main(int argc, char **argv)
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

gContext = new MythContext(MYTH_BINARY_VERSION);
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythtranscode/main.cpp
Expand Up @@ -22,6 +22,7 @@ using namespace std;
#include "mpeg2fix.h"
#include "remotefile.h"
#include "mythtranslation.h"
#include "loggingserver.h"
#include "mythlogging.h"
#include "commandlineparser.h"
#include "recordinginfo.h"
Expand Down Expand Up @@ -377,6 +378,7 @@ int main(int argc, char *argv[])
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

// Load the context
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythtv-setup/main.cpp
Expand Up @@ -14,6 +14,7 @@
#include "mythcontext.h"
#include "mythdbcon.h"
#include "dbutil.h"
#include "loggingserver.h"
#include "mythlogging.h"
#include "mythversion.h"
#include "langsettings.h"
Expand Down Expand Up @@ -336,6 +337,7 @@ int main(int argc, char *argv[])
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

if (cmdline.toBool("display"))
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythutil/main.cpp
Expand Up @@ -10,6 +10,7 @@
#include "exitcodes.h"
#include "mythcontext.h"
#include "mythversion.h"
#include "loggingserver.h"
#include "mythlogging.h"

// Local includes
Expand Down Expand Up @@ -88,6 +89,7 @@ int main(int argc, char *argv[])
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

gContext = new MythContext(MYTH_BINARY_VERSION);
Expand Down
2 changes: 2 additions & 0 deletions mythtv/programs/mythwelcome/main.cpp
Expand Up @@ -20,6 +20,7 @@
#include "lcddevice.h"
#include "commandlineparser.h"
#include "tv.h"
#include "loggingserver.h"
#include "mythlogging.h"
#include "signalhandling.h"

Expand Down Expand Up @@ -87,6 +88,7 @@ int main(int argc, char **argv)
signallist << SIGRTMIN;
#endif
SignalHandler::Init(signallist);
SignalHandler::SetHandler(SIGHUP, logSigHup);
#endif

gContext = new MythContext(MYTH_BINARY_VERSION, true);
Expand Down

0 comments on commit 96eb89a

Please sign in to comment.