[Wine]How to auto-restart win32 app

Saulius Krasuckas saulius2 at ar.fi.lt
Tue Nov 9 03:34:28 CST 2004


On Sun, 7 Nov 2004, Walt Ogburn wrote:
...
> On Sat, 6 Nov 2004, Matthew L Reed wrote:
> > I have a win32 app that I run 24/7. On occasion it will go into the
> > debugger, and I have to kill it and restart it. Is there any to have it
> > automatically restart when it crashes?
... 
> You could use a cron job to check its status and restart if necessary, or
> use an expect script like the one below.  I don't know much about expect,
> but this should do what you want.  Just put in the name of the exe file.
> 
> ==============================================================
> #!/usr/bin/expect -f
> 
> set EXEFILE "/home/reuben/c/Program\ Files/aloha/Aloha.exe"
> 
> spawn winelauncher $EXEFILE
> 
> while {1} {
>     expect "Wine-dbg>$" {
>         send "quit\n"
>         spawn winelauncher $EXEFILE
>     }
> }
> ==============================================================

Nice introduction in to 'expect', thanks Walt.

AFAIK, another one possibility to achieve this would be to set the
"Debugger" value at the "AeDebug" key in a registry [1] to something else.  

For example, Kenneth Porter from wine-devel [2] has changed it from
"winedbg %ld %ld" to "true".  AFAICS, it works fine.


[1] http://www.winehq.org/site/docs/wine-devel/dbg-config
[2] http://www.winehq.org/hypermail/wine-devel/2004/11/0166.html




More information about the wine-users mailing list