summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY5
-rw-r--r--config.h4
-rw-r--r--vdr.c9
4 files changed, 13 insertions, 6 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 97090265..3736be43 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -464,6 +464,7 @@ Gerhard Steiner <steiner@mail.austria.com>
Jaakko Hyvätti <jaakko@hyvatti.iki.fi>
for translating OSD texts to the Finnish language
+ for adding a check if there is a connection to the keyboard
Dennis Noordsij <dennis.noordsij@wiral.com>
for reporting a small glitch when switching channels
diff --git a/HISTORY b/HISTORY
index 3ef96589..1fc8421d 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1862,3 +1862,8 @@ Video Disk Recorder Revision History
(Thanks to Thomas Sailer for pointing out how to set the terminal parameters to
read from the keyboard).
- The 'ncurses' library is now only necessary when compiling VDR with DEBUG_OSD=1.
+
+2002-12-13: Version 1.1.20
+
+- Now checking if there is a connection to the keyboard (thanks to Jaakko Hyvätti)
+ and only creating the KBD remote control if VDR is running in the foreground.
diff --git a/config.h b/config.h
index 50e31564..d09729e7 100644
--- a/config.h
+++ b/config.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.h 1.143 2002/12/06 14:17:55 kls Exp $
+ * $Id: config.h 1.144 2002/12/13 13:41:55 kls Exp $
*/
#ifndef __CONFIG_H
@@ -19,7 +19,7 @@
#include "device.h"
#include "tools.h"
-#define VDRVERSION "1.1.19"
+#define VDRVERSION "1.1.20"
#define MAXPRIORITY 99
#define MAXLIFETIME 99
diff --git a/vdr.c b/vdr.c
index 8f22f11b..e253b792 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.137 2002/12/08 13:34:39 kls Exp $
+ * $Id: vdr.c 1.138 2002/12/13 13:37:28 kls Exp $
*/
#include <getopt.h>
@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
// Save terminal settings:
struct termios savedTm;
- tcgetattr(STDIN_FILENO, &savedTm);
+ bool HasStdin = tcgetpgrp(STDIN_FILENO) == getpid() && tcgetattr(STDIN_FILENO, &savedTm) == 0;
// Initiate locale:
@@ -386,7 +386,7 @@ int main(int argc, char *argv[])
new cLircRemote("/dev/lircd");
#endif
#if defined(REMOTE_KBD)
- if (!DaemonMode)
+ if (!DaemonMode && HasStdin)
new cKbdRemote;
#endif
Interface->LearnKeys();
@@ -724,7 +724,8 @@ int main(int argc, char *argv[])
isyslog("exiting");
if (SysLogLevel > 0)
closelog();
- tcsetattr(STDIN_FILENO, TCSANOW, &savedTm);
+ if (HasStdin)
+ tcsetattr(STDIN_FILENO, TCSANOW, &savedTm);
if (cThread::EmergencyExit()) {
esyslog("emergency exit!");
return 1;