mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
No longer calling 'abort()'
This commit is contained in:
parent
f3f2d4577d
commit
28130daef7
2
HISTORY
2
HISTORY
@ -445,3 +445,5 @@ Video Disk Recorder Revision History
|
||||
systems with three or more DVB cards.
|
||||
- Added the "statdvb2vdr" tool from Hans-Peter Raschke.
|
||||
- Fixed a segfault that sometimes happened when killing VDR.
|
||||
- VDR now returns an exit status of '2' in case of an error at startup, instead
|
||||
of terminating with 'abort()' (which caused a core dump).
|
||||
|
3
runvdr
3
runvdr
@ -9,7 +9,8 @@ KILLPROC="/sbin/killproc -TERM"
|
||||
while (true) do
|
||||
# (cd $DVBDIR; make reload)
|
||||
# sleep 3
|
||||
if $VDRCMD; then exit; fi
|
||||
$VDRCMD
|
||||
if test $? != 1; then exit; fi
|
||||
date
|
||||
echo "restarting VDR"
|
||||
$KILLPROC $VDRPRG
|
||||
|
20
vdr.c
20
vdr.c
@ -22,7 +22,7 @@
|
||||
*
|
||||
* The project's page is at http://www.cadsoft.de/people/kls/vdr
|
||||
*
|
||||
* $Id: vdr.c 1.55 2001/03/31 10:18:25 kls Exp $
|
||||
* $Id: vdr.c 1.56 2001/04/01 11:16:54 kls Exp $
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
@ -104,7 +104,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "vdr: invalid DVB device number: %s\n", optarg);
|
||||
abort();
|
||||
return 2;
|
||||
break;
|
||||
case 'h': printf("Usage: vdr [OPTION]\n\n" // for easier orientation, this is column 80|
|
||||
" -c DIR, --config=DIR read config files from DIR (default is to read them\n"
|
||||
@ -139,13 +139,13 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "vdr: invalid log level: %s\n", optarg);
|
||||
abort();
|
||||
return 2;
|
||||
break;
|
||||
case 'p': if (isnumber(optarg))
|
||||
SVDRPport = atoi(optarg);
|
||||
else {
|
||||
fprintf(stderr, "vdr: invalid port number: %s\n", optarg);
|
||||
abort();
|
||||
return 2;
|
||||
}
|
||||
break;
|
||||
case 't': Terminal = optarg;
|
||||
@ -162,9 +162,9 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "vdr: invalid watchdog timeout: %s\n", optarg);
|
||||
abort();
|
||||
return 2;
|
||||
break;
|
||||
default: abort();
|
||||
default: return 2;
|
||||
}
|
||||
}
|
||||
|
||||
@ -177,7 +177,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (!DirectoryOk(VideoDirectory, true)) {
|
||||
fprintf(stderr, "vdr: can't access video directory %s\n", VideoDirectory);
|
||||
abort();
|
||||
return 2;
|
||||
}
|
||||
|
||||
// Daemon mode:
|
||||
@ -188,7 +188,7 @@ int main(int argc, char *argv[])
|
||||
if (pid < 0) {
|
||||
fprintf(stderr, "%m\n");
|
||||
esyslog(LOG_ERR, "ERROR: %m");
|
||||
abort();
|
||||
return 2;
|
||||
}
|
||||
if (pid != 0)
|
||||
return 0; // initial program immediately returns
|
||||
@ -197,7 +197,7 @@ int main(int argc, char *argv[])
|
||||
fclose(stderr);
|
||||
#else
|
||||
fprintf(stderr, "vdr: can't run in daemon mode with DEBUG_OSD or REMOTE_KBD on!\n");
|
||||
abort();
|
||||
return 2;
|
||||
#endif
|
||||
}
|
||||
else if (Terminal) {
|
||||
@ -227,7 +227,7 @@ int main(int argc, char *argv[])
|
||||
// DVB interfaces:
|
||||
|
||||
if (!cDvbApi::Init())
|
||||
abort();
|
||||
return 2;
|
||||
|
||||
cDvbApi::SetPrimaryDvbApi(Setup.PrimaryDVB);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user