From: Magnus Edenhill Date: Sat, 16 Feb 2008 20:42:13 +0000 (+0000) Subject: - Log crashes to syslog. X-Git-Tag: 2.12~1189 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c4e5e6e7b84b807fb4231ced5918a4caa485e2ff;p=thirdparty%2Ftvheadend.git - Log crashes to syslog. --- diff --git a/main.c b/main.c index a50432b5d..2ad877ff9 100644 --- a/main.c +++ b/main.c @@ -57,6 +57,9 @@ #include "file_input.h" #include "cwc.h" #include "autorec.h" + +#include + 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);