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

Anthony Giggins seven at seven.dorksville.net
Sun Mar 17 21:36:57 UTC 2013


On 18 March 2013 04:28, Alex Tomlins <alex at tomlins.org.uk> wrote:

> 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
>

I find the mythbuntu auto restart script seems to work fairly reliably,
maybe not as quick as a manual kill and restart but it works much more like
the appliance it should be :)

Cheers,

Anthony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130318/2e1dec04/attachment.html>


More information about the mythtv-users mailing list