[NTLUG:Discuss] script hang
Kevin Brannen
kbrannen at pwhome.com
Wed Mar 9 22:42:11 CST 2005
Kyle Davenport wrote:
>...
>It's tricky now because it involves fooling the 6200 into seeing a DVHS on
>the firewire bus. Step 1 is "modprobe raw1394". Then start a loop in the
>background of "dvcont record" which retries on failure until it succeeds.
>While that's running I run "ddr1394". The trick is that the ddr1394 more
>often then not fails and loops spewing an error condition. If I cntl-C it,
>and retry the "ddr1394", it will usually start working in 2-5 times.
>
>Since I've been scripting for some 25 years now, I thought, fine, I will
>just duplicate that whole process with a script. I tried
>
>while :; do
> eval 'ddr1394 >out 2>err &'
> pid=$!
> sleep 3
> if errorstring in err; then
> kill $pid
> else
> break
> fi
>done
>until killed ; do keep on recording; done
>
>
>somehow this doesn't work at all! I don't understand why this doesn't
>duplicate what I'm doing manually. Instead, when I try to kill it, the
>ddr1394 locks the bus, and the only way out is a reboot.
>
>Any clues?
>Kyle
>
>
Um, why do you have the eval in there? Does the ddr1394 command really
return something you need to pull back into your current (loop)
process? My guess would be no, so remove the eval and the single quotes.
Kevin
More information about the Discuss
mailing list