[mythtv-users] Restart Myth by remote control

ben ben at handcoder.com
Wed Apr 23 11:30:09 UTC 2003


Well a couple of things.  One of the reasons I took this route is that
myth freezes not just segfaults.  This lets me get around that.  I
always try to  report segfaults, but I constantly run in debug and gdb.
It takes up to much processor.  So while my wife is out on the weekends,
I recompile with debug and try to recreate any segfaults I've had over
the last week.  If you look back through the archives probably half my
emails have the word bug attached to them.

Ben

-----Original Message-----
From: mythtv-users-bounces at snowman.net
[mailto:mythtv-users-bounces at snowman.net] On Behalf Of Dan Conti
Sent: Wednesday, April 23, 2003 12:33 AM
To: Discussion about mythtv
Subject: Re: [mythtv-users] Restart Myth by remote control


Why not have a script that runs mythfrontend in the foreground in a
loop, and whenever the process exits it checks the error code.
Intentional exits should give back 0, and crashes should give back
nonzero, so the script could automagically start mythfrontend again on
nonzero results. Then start the script in the background.

I guess another factor is that if you are using CVS and getting
segfaults it would be of more use to actually track these in hopes of
debugging them, rather than work around them as best as possible..

On Wed, 23 Apr 2003, ben wrote:

> Just thought I'd share a little idea I had.  Since Mythfrontend still 
> has a seg fault every now and then, and since my wife doesn't 
> understand how to restart Mythfront end.  I mapped one of my remote 
> keys to a script that restarts mythfrontend.  The basic gist is this.

> I'm using Xdialog (http://www.chez.com/godefroy/) to display a window 
> that you can select to restart or not, thus avoiding accidental 
> restarts. If you don't want to do this you can just ignore remove 
> everything but the killall and and mythfrontend commands.
>
> Script looks like this:
>
> #!/bin/sh
>
> Xdialog --title "Restart Mythtv" --yesno "Would you like to restart 
> MythTV?" 0 0
>
> if [ $? -eq 0 ]
> then
>     sudo killall mythfrontend
>     mythfrontend &
> fi
>
> Save this and store it somewher in you path.  I used /bin
>
> Next add this to your lircrc:
>
> begin
>     prog = irexec
>     button = tivo #Whatever Button you want to use
>     config = RestartMyth.sh
> End
>
> Finally, add irexec to whatever script you are using to start 
> irxevent.
>
> Now you have a restart key.  Makes the Spousal Approval Level much 
> higher.
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at snowman.net 
> http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users
>
_______________________________________________
mythtv-users mailing list
mythtv-users at snowman.net
http://lists.snowman.net/cgi-bin/mailman/listinfo/mythtv-users



More information about the mythtv-users mailing list