From 5da044b4ae504e15de7acd09f0ebec5b41b70c78 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 6 Sep 2008 11:10:17 +0200 Subject: Fixed a problem with calling isyslog() from within the SignalHandler() --- CONTRIBUTORS | 1 + HISTORY | 2 ++ vdr.c | 7 ++++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index b9eb41f6..c3a310b7 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1579,6 +1579,7 @@ Udo Richter for making housekeeping wait for a while after a replay has ended for fixing error handling in cCuttingThread::Action() for suppressing the automatic shutdown if the remote control is currently disabled + for fixing a problem with calling isyslog() from within the SignalHandler() Sven Kreiensen for his help in keeping 'channels.conf.terr' up to date diff --git a/HISTORY b/HISTORY index 97254857..15ab2afe 100644 --- a/HISTORY +++ b/HISTORY @@ -5752,3 +5752,5 @@ Video Disk Recorder Revision History fontconfig (suggested by Edgar Toernig). - Updated the sources.conf file (thanks to Oleg Roitburd). - Fixed a possible integer overflow in GetAbsTime() (thanks to Alexander Rieger). +- Fixed a problem with calling isyslog() from within the SignalHandler() (thanks + to Udo Richter). diff --git a/vdr.c b/vdr.c index 5ea62d69..728aec5f 100644 --- a/vdr.c +++ b/vdr.c @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/vdr * - * $Id: vdr.c 1.313 2008/03/14 13:22:39 kls Exp $ + * $Id: vdr.c 1.313.1.1 2008/09/06 11:07:52 kls Exp $ */ #include @@ -141,7 +141,6 @@ static bool SetKeepCaps(bool On) static void SignalHandler(int signum) { - isyslog("caught signal %d", signum); switch (signum) { case SIGPIPE: break; @@ -1288,9 +1287,11 @@ Exit: ReportEpgBugFixStats(); if (WatchdogTimeout > 0) dsyslog("max. latency time %d seconds", MaxLatencyTime); - isyslog("exiting, exit code %d", ShutdownHandler.GetExitCode()); + if (LastSignal) + isyslog("caught signal %d", LastSignal); if (ShutdownHandler.EmergencyExitRequested()) esyslog("emergency exit!"); + isyslog("exiting, exit code %d", ShutdownHandler.GetExitCode()); if (SysLogLevel > 0) closelog(); if (HasStdin) -- cgit v1.2.3