Mailing List archive

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

[vdr] Re: GRAB from reccmds.conf



Lars Fredriksson wrote:
> Hi!
> 
> I have a problem when I'm trying to do a grab from 
> reccmds.conf - I just get
> the following in syslog;
> 
> Mar  8 20:01:01 digestive vdr[15643]: executing command
> '/usr/src/VDR/svdrpsend.pl GRAB
> '/video/%Klassisk_musik_för_små_barn/2004-01-24.11:23.50.99.rec''
> Mar  8 20:01:31 digestive vdr[15643]: connect from 127.0.0.1, 
> port 47496 -
> accepted
> Mar  8 20:01:31 digestive vdr[15643]: ERROR (svdrp.c,354): Broken pipe
> 
> the above is a axample when i have "/usr/src/VDR/svdrpsend.pl GRAB" in
> reccmds.conf - but I get the same error when I'm using a 
> shell-script that
> looks like:
> "
> #!/bin/sh
> /usr/src/VDR/svdrpsend.pl GRAB /tmp/grabbed.jpg
> "

Hi,

The problem is, that as long as the command from reccmds is running vdr is
"blocked" (it accepts the SVDRP connection but cannot process it) so the
command get lost and the connection is terminated before vdr can process it.

I made myself a small script for such cases:
send.sh:
------------------------
#!/bin/sh
sleep 1
svdrpsend.pl $@
------------------------

Which i call from my vdr scripts like:
-----------------
# do something
# do another thing
send.sh GRAB /blah.jpg &   # the & is the important thing
-----------------
So the main script ends because the other script was called with & and vdr
is ready to accept the message.

Ciao Ulrich




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



Home | Main Index | Thread Index