Mailing List archive

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

[vdr] Re: VDR developer version 1.1.20



Oliver Endriss wrote:
> 
> Klaus Schmidinger wrote:
> > Oliver Endriss wrote:
> > > There is just one problem in 1.1.20:
> > > The KBD remote control does not work if vdr is started from a shell
> > > script:
> >
> > What I was trying to do here is to find out whether VDR is running in
> > the background (where accessing the keyboard would make no sense -
> > and actually _stopped_ the process, waiting for kbd access).
> >
> > Can somebody come up with a (different) way of finding out whether a
> > program is running in the background?
> 
> Hmm, why don't you use a more hard-wired approach?
> vdr is running in the background
> - if the -d option has been specified AND
> - the -t option has not been specified.
> Otherwise assume that vdr is running in the foreground.

What about

   vdr &

?

> Additionally, tcgetattr() will fail if stdin has been redirected
> to /dev/null (something like "vdr < /dev/null").

I guess checking isatty(0) will take care of this.

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________


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



Home | Main Index | Thread Index