- Log crashes to syslog.
This commit is contained in:
parent
fb0d3da575
commit
c4e5e6e7b8
1 changed files with 14 additions and 0 deletions
14
main.c
14
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue