summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-02-15 15:46:19 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2003-02-15 15:46:19 +0100
commit33c8ad925a13169e35636f79fca9423ee56b55e4 (patch)
treeae0e7c0ea11e35200db6a898dc927f526f5862d5
parent69e9a07f8b5808d04207256fd4413c4eece93966 (diff)
downloadvdr-33c8ad925a13169e35636f79fca9423ee56b55e4.tar.gz
vdr-33c8ad925a13169e35636f79fca9423ee56b55e4.tar.bz2
Improved keyboard detection
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--vdr.c4
3 files changed, 4 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 7bc76b99..c10172fa 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -217,6 +217,7 @@ Werner Fink <werner@suse.de>
contains Dolby Digital data
for improving thread locking in the ring buffer to avoid possible race conditions
under heavy load
+ for improving keyboard detection
Rolf Hakenes <hakenes@hippomi.de>
for providing 'libdtv' and adapting the EIT mechanisms to it
diff --git a/HISTORY b/HISTORY
index 2c5b4c59..9d466908 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1965,3 +1965,4 @@ Video Disk Recorder Revision History
- Now polling the output device in 'Transfer Mode' and retrying to put packets
into the ring buffer.
- Resetting the CAM slot in case communication breaks down.
+- Improved keyboard detection (thanks to Werner Fink).
diff --git a/vdr.c b/vdr.c
index dfaf5dcb..49371064 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.143 2003/02/09 13:13:42 kls Exp $
+ * $Id: vdr.c 1.144 2003/02/15 15:36:01 kls Exp $
*/
#include <getopt.h>
@@ -81,7 +81,7 @@ int main(int argc, char *argv[])
// Save terminal settings:
struct termios savedTm;
- bool HasStdin = tcgetpgrp(STDIN_FILENO) == getpid() && tcgetattr(STDIN_FILENO, &savedTm) == 0;
+ bool HasStdin = (tcgetpgrp(STDIN_FILENO) == getpid() || getppid() != (pid_t)1) && tcgetattr(STDIN_FILENO, &savedTm) == 0;
// Initiate locale: