Mailing List archive

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

[vdr] Re: Problems with exit-states (now VDR-1.2.4)



Am Mittwoch, 3. September 2003 00:08 schrieb Klaus Schmidinger:
> Steffen Barszus wrote:
> > Am Dienstag, 2. September 2003 23:47 schrieb Klaus Schmidinger:
> > > Steffen Barszus wrote:
> > > > Am Dienstag, 2. September 2003 23:37 schrieb Klaus Schmidinger:
> > > > > Please locate the lines
> > > > >
> > > > >      stdin  = freopen(Terminal, "r", stdin);
> > > > >      stdout = freopen(Terminal, "w", stdout);
> > > > >      stderr = freopen(Terminal, "w", stderr);
> > > > >
> > > > > in vdr.c and insert something like
> > > > >
> > > > >      fprintf(stderr, "passed line %d\n", __LINE__);
> > > > >
> > > > > after each of them. Let's see how far we get.
> > > > >
> > > > > Klaus
> > > >
> > > > ]# su -c 'vdr --config=/etc/vdr --record=/usr/bin/vdrreccmd
> > > > --shutdown=/usr/bin/vdrshutdown -t /dev/tty9 --watchdog=60
> > > > --log=3 -P"mp3" ; echo $? ' vdr
> > > > vdr: argc = 9
> > > >  'vdr'
> > > >  '--config=/etc/vdr'
> > > >  '--record=/usr/bin/vdrreccmd'
> > > >  '--shutdown=/usr/bin/vdrshutdown'
> > > >  '-t'
> > > >  '/dev/tty9'
> > > >  '--watchdog=60'
> > > >  '--log=3'
> > > >  '-Pmp3'
> > > > passed line 327
> > > > passed line 329
> > > > 139
> > >
> > > Since the line numbers are different from those in my vdr.c (I
> > > would have expected the first one to be 324) I assume you are
> > > running a patched version. Please retry with plain vanilla VDR.
> >
> > I had the dvd/iframe patch applied, thought it would be save.
>
> What exactly does that patch do?
>
> > Doesn't matter :
> >
> > ]# su -c 'vdr --config=/etc/vdr --record=/usr/bin/vdrreccmd
> > --shutdown=/usr/bin/vdrshutdown -t /dev/tty9 --watchdog=60 --log=3
> > -P"mp3" ; echo $? ' vdr
> > passed line 324
> > passed line 326
> > 139
>
> So apparently the call to freopen(Terminal, "w", stderr) causes
> the problem.
>
> I'm afraid I can't imagine why this call should cause an unexpected
> exit from the program - and also why this would only happen when a
> plugin is present.
>
> Does this happen with _any_ plugin? Can you try the "hello" plugin
> for a change?

I have tried vcd and mp3, but now i can reproduce it even w/o any 
plugin.  ^-^  This is totally myterious . 

]# su -c 'vdr -t /dev/tty11 ; echo $? ' vdr
passed line 324
passed line 326
139

[root@localhost init.d]# su -c "vdr -t /dev/tty11 -Pvcd ; echo $?" vdr
passed line 324
passed line 326
0

I guess i need some sleep now, or it is just that weird ....

[root@localhost init.d]# su -c "vdr -t /dev/tty11 -Pvcd ; echo $?" root
passed line 324
passed line 326
0
[root@localhost init.d]# vdr -t /dev/tty11 -Pvcd ; echo $?
passed line 324
passed line 326
2
[root@localhost init.d]# vdr -t /dev/tty11 ; echo $?
passed line 324
passed line 326
2
[root@localhost init.d]# su -c "vdr -t /dev/tty11 ; echo $?" root
passed line 324
passed line 326
0

[root@localhost init.d]# su -c 'vdr -t /dev/tty11; echo $?' root
passed line 324
passed line 326
2

>
> You could also try commenting out that freopen() call to see what
> happens then.

Did that and the effect can't be reproduced then. Have it now like this: 

    // Claim new controlling terminal
     stdin  = freopen(Terminal, "r", stdin);
     fprintf(stderr, "passed line %d\n", __LINE__);
     stdout = freopen(Terminal, "w", stdout);
     fprintf(stderr, "passed line %d\n", __LINE__);
 //    stderr = freopen(Terminal, "w", stderr);
     fprintf(stderr, "passed line %d\n", __LINE__);

HTH

Steffen


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



Home | Main Index | Thread Index