[mythtv] Myth calls external channel change script for two inputs
simultaneously
Stephen Davies
steve at daviesfam.org
Wed Nov 12 14:19:48 EST 2003
Hi,
I have two pvr250 cards, connected to a "dual channel" satellite
receiver. I use lirc to change channels.
I was wondering why Myth occasionally recorded the wrong channel,
until I noticed that if you schedule two recordings for the exact same
time, then "exact same time" really means that and you end up with two
copies of the change-channel script running at the same time.
I fixed the problem by having my script make and release a lock file:
echo $$ >/var/lock/changechannel.lock.$$
while ! ln /var/lock/changechannel.lock.$$ /var/lock/changechannel.lock; do
sleep 1
done
...do lirc send_once stuff...
rm /var/lock/changechannel.lock.$$ /var/lock/changechannel.lock
I can provide a patch for the contributed channel change examples, or
alternatively Myth itself could use a lock to avoid two channel
changes running at the same time?
Thanks,
Steve
More information about the mythtv-dev
mailing list