summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-09-05 13:02:15 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-09-05 13:02:15 +0200
commitca9e7b69371f475faba079a913d3d54fa4f4f54d (patch)
tree2e8c27c7a781c2062931c92ce2490139a272eff2 /vdr.c
parent2ac21ab000e1aac3441acdce041fa0f76ab64f93 (diff)
downloadvdr-ca9e7b69371f475faba079a913d3d54fa4f4f54d.tar.gz
vdr-ca9e7b69371f475faba079a913d3d54fa4f4f54d.tar.bz2
Fixed a crash when using the --terminal option without having access to the given terminal
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/vdr.c b/vdr.c
index 9c54e3a4..051e3d85 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.166 2003/08/24 11:18:04 kls Exp $
+ * $Id: vdr.c 1.167 2003/09/05 13:01:00 kls Exp $
*/
#include <getopt.h>
@@ -199,6 +199,10 @@ int main(int argc, char *argv[])
case 's': Shutdown = optarg;
break;
case 't': Terminal = optarg;
+ if (access(Terminal, R_OK | W_OK) < 0) {
+ fprintf(stderr, "vdr: can't access terminal: %s\n", Terminal);
+ return 2;
+ }
break;
case 'V': DisplayVersion = true;
break;