Ah, thanks Triode.  Well, the good news is that I am making progress in
understanding this.  The bad news is, I still don't know how to kill
the orphan.  Here is my current mplayer.sh with checkpoints:

#!/bin/sh
app=mplayer
scriptpid=$$
apppid=/tmp/.alienbbc-app.$$.pid

# For mplayer pre7 and later comment out following line and uncomment
line after
if [ -e "${12}" ] || [ -e "${13}" ] ; then
# if [ -e "${10}" ] ; then
echo Local File: Launching $app $1 $2 $3 $4 $5 $6 $7 $8 $9 "${10}"
${11} "${12}" "${13}" >&2
$app $1 $2 $3 $4 $5 $6 $7 $8 $9 "${10}" ${11} "${12}" "${13}" 3>&1
1>&2
exit
fi

echo Streaming: Launching $app $* >&2
(
echo checkpoint 1 >&2
$app $* 3>&1 1>&2 &
echo checkpoint 2 >&2
echo $! > $apppid
echo checkpoint 3 >&2
wait
echo checkpoint 4 >&2
rm -f $apppid
echo checkpoint 5 >&2
kill $scriptpid 2> /dev/null
echo checkpoint 6 >&2
) < /dev/null &

echo checkpoint 7 >&2
cat > /dev/null
echo checkpoint 8 >&2
if [ -s $apppid ] ; then
(
echo checkpoint 9 >&2
kill `cat $apppid` 2> /dev/null
echo checkpoint 10 >&2
)
fi

Now, I see checkpoints 1, 2, 3, and 7.  I am stopping the stream by
pressing the power button on the remote control (but the result is
similar if I change streams.)  So for whatever reason the cat is not
terminating as one would expect.  Any insights?

Thanks!


-- 
tygar
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to