[mythtv-users] Mythbuntu's kill/restart irexec command kills but no longer restarts until pressed again

Alex Tomlins alex at tomlins.org.uk
Sun Mar 17 18:28:18 UTC 2013


On 17/03/13 16:15, Ian Evans wrote:
> I think that's the first time my subject pretty much summed up my
> whole issue. :-)
>
> Mythbuntu's kill/restart irexec command kills but no longer restarts
> until pressed again.
>
> That is, the power/clear combo that kills mythfrontend and restarts
> it, now just kills it. If I hit the combo again, it finally restarts.
>
> The command hasn't changed. Any idea why it would take two usages now
> instead of one?
>
> Here's the command that's sent:
>
> (kill $(pgrep mythfrontend) || true) && mythfrontend --service &
>
It could well be a race condition...

My guess is that on the first press, it sends the kill signal to 
mythfrontend, but then when it tries to start it again, the old instance 
hasn't finished exiting causing the new instance to fail to start (ports 
already in use etc...).  On the second call, it will start successfully 
because by then the old instance has exited.

You could test this by adding a sleep in between the 2 commands.

thanks,
Alex

-- 
Alex Tomlins
Email/Jabber: alex at tomlins.org.uk

There are two kinds of people in the world: those who finish what they started



More information about the mythtv-users mailing list