]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
- Log crashes to syslog.
authorMagnus Edenhill <maglun@packetfront.com>
Sat, 16 Feb 2008 20:42:13 +0000 (20:42 +0000)
committerMagnus Edenhill <maglun@packetfront.com>
Sat, 16 Feb 2008 20:42:13 +0000 (20:42 +0000)
main.c

diff --git a/main.c b/main.c
index a50432b5df6b54c26560031c2428ddb3c12c7558..2ad877ff9a006e1c8ab58d930219549aa98c7f4e 100644 (file)
--- a/main.c
+++ b/main.c
@@ -57,6 +57,9 @@
 #include "file_input.h"
 #include "cwc.h"
 #include "autorec.h"
+
+#include <libhts/htsparachute.h>
+
 int running;
 int xmltvreload;
 int startupcounter;
@@ -100,6 +103,15 @@ handle_sigpipe(int x)
   return;
 }
 
+static void
+pull_chute (int sig)
+{
+  char pwd[PATH_MAX];
+
+  getcwd(pwd, sizeof(pwd));
+  syslog(LOG_ERR, "HTS TV Headend crashed on signal %i (pwd \"%s\")",
+        sig, pwd);
+}
 
 int
 main(int argc, char **argv)
@@ -198,6 +210,8 @@ main(int argc, char **argv)
 
   dispatch_init();
 
+  htsparachute_init(pull_chute);
+
   signal(SIGUSR1, xmltvdoreload);
   signal(SIGTERM, doexit);
   signal(SIGINT, doexit);