Add -A option that crashes tvheadend immediately
This commit is contained in:
parent
c9dbcc531a
commit
e52cf18a05
1 changed files with 9 additions and 2 deletions
11
src/main.c
11
src/main.c
|
@ -232,8 +232,9 @@ main(int argc, char **argv)
|
|||
const char *join_transport = NULL;
|
||||
char *p, *endp;
|
||||
uint32_t adapter_mask = 0xffffffff;
|
||||
int crash = 0;
|
||||
|
||||
while((c = getopt(argc, argv, "a:fu:g:c:Chdr:j:")) != -1) {
|
||||
while((c = getopt(argc, argv, "Aa:fu:g:c:Chdr:j:")) != -1) {
|
||||
switch(c) {
|
||||
case 'a':
|
||||
adapter_mask = 0x0;
|
||||
|
@ -255,6 +256,9 @@ main(int argc, char **argv)
|
|||
usage(argv[0]);
|
||||
}
|
||||
break;
|
||||
case 'A':
|
||||
crash = 1;
|
||||
break;
|
||||
case 'f':
|
||||
forkaway = 1;
|
||||
break;
|
||||
|
@ -410,7 +414,10 @@ main(int argc, char **argv)
|
|||
"running as pid:%d uid:%d gid:%d, settings located in '%s'",
|
||||
htsversion_full,
|
||||
getpid(), getuid(), getgid(), hts_settings_get_root());
|
||||
|
||||
|
||||
if(crash)
|
||||
abort();
|
||||
|
||||
mainloop();
|
||||
|
||||
tvhlog(LOG_NOTICE, "STOP", "Exiting HTS Tvheadend");
|
||||
|
|
Loading…
Add table
Reference in a new issue