Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: AW: Problem using vdr-1.1.24 with keyboard



On Thu, Feb 13, 2003 at 06:52:09PM +0100, Oliver Endriss wrote:
> David Philippi wrote:
> > On Thursday 13 February 2003 07:23, you wrote:
> > > das Problem gibt es seit 1.1.20, in der vdr.c muss irgendwo eine
> > > Zeile geändert werden, habe es aber gerade nicht hier.
> >
> > Thanks I'll get a 1.1.19 until someone posts  the line or 1.1.25
> > comes out witth the fix (I'd hope the latter to be the case).
> 
> Try this fix together with the -t option. 
> 
> --- vdr.c.orig	Sun Feb  9 14:13:42 2003
> +++ vdr.c	Thu Feb 13 18:42:44 2003
> @@ -322,6 +322,7 @@
>       stdin  = freopen(Terminal, "r", stdin);
>       stdout = freopen(Terminal, "w", stdout);
>       stderr = freopen(Terminal, "w", stderr);
> +     HasStdin = true;
>       }

This will do both jobs ... vdr does run in runvdr and will fail
in case of using `vdr &':

--- vdr.c
+++ vdr.c       Wed Jan 29 18:14:52 2003
@@ -81,7 +81,9 @@
   // Save terminal settings:
 
   struct termios savedTm;
-  bool HasStdin = tcgetpgrp(STDIN_FILENO) == getpid() && tcgetattr(STDIN_FILENO, &savedTm) == 0;
+  pid_t pgrp = tcgetpgrp(STDIN_FILENO);
+  pid_t ppid = getppid();
+  bool HasStdin = (pgrp == getpid() || ppid != (pid_t)1) && tcgetattr(STDIN_FILENO, &savedTm) == 0;
 
   // Initiate locale:
 
[...]


       Werner


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index