summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2007-04-30 09:24:30 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2007-04-30 09:24:30 +0200
commitf935c03c792ddf5f2aac6522bfa1597ac5507ca6 (patch)
treeec15f35b6e269b53173ab5f7e4892906af0189b5 /vdr.c
parent853f6064bfb342ccd9e1e5e7cfb440ed97bb1e1e (diff)
downloadvdr-f935c03c792ddf5f2aac6522bfa1597ac5507ca6.tar.gz
vdr-f935c03c792ddf5f2aac6522bfa1597ac5507ca6.tar.bz2
Fixed a race condition with signal handlers at program exit
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/vdr.c b/vdr.c
index fa5d72bb..c01588fa 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.287 2007/04/22 13:28:32 kls Exp $
+ * $Id: vdr.c 1.288 2007/04/30 09:22:27 kls Exp $
*/
#include <getopt.h>
@@ -1203,6 +1203,13 @@ int main(int argc, char *argv[])
Exit:
+ // Reset all signal handlers to default before Interface gets deleted:
+ signal(SIGHUP, SIG_DFL);
+ signal(SIGINT, SIG_DFL);
+ signal(SIGTERM, SIG_DFL);
+ signal(SIGPIPE, SIG_DFL);
+ signal(SIGALRM, SIG_DFL);
+
PluginManager.StopPlugins();
cRecordControls::Shutdown();
cCutter::Stop();