diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2008-09-06 11:26:01 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2008-09-06 11:26:01 +0200 |
commit | 4f9b3175d0ce2f5e4ee0e608eb4d90de040df41c (patch) | |
tree | 9843ea4bd35624fa309f7b4ea315087055059442 /vdr.c | |
parent | 4844235c772516a36ad79dbf2c0beebef317dd4b (diff) | |
download | vdr-4f9b3175d0ce2f5e4ee0e608eb4d90de040df41c.tar.gz vdr-4f9b3175d0ce2f5e4ee0e608eb4d90de040df41c.tar.bz2 |
Fixed a problem with calling isyslog() from within the SignalHandler()
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/vdr * - * $Id: vdr.c 2.1 2008/05/03 10:16:41 kls Exp $ + * $Id: vdr.c 2.2 2008/09/06 11:24:21 kls Exp $ */ #include <getopt.h> @@ -141,7 +141,6 @@ static bool SetKeepCaps(bool On) static void SignalHandler(int signum) { - isyslog("caught signal %d", signum); switch (signum) { case SIGPIPE: break; @@ -1285,9 +1284,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) |