How to close nicely a wine application from script

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
anto12358
Level 1
Level 1
Posts: 5
Joined: Sun Jan 15, 2012 7:43 am

How to close nicely a wine application from script

Post by anto12358 »

I need to close nicely (i.e. just like pressing the x button on the window) a wine application (in this case uTorrent) from a script. I tried something like this:

kill -N `pgrep uTorrent.exe`

but no matter which signal number I use, it appears that the process is terminated badly. When it is restarted, uTorrent checks the started torrents, just like it does when it crashes. The same happens if I try ending wineserver (I couldn't do it anyway like this, because I have other wine processes running).

Is there a way to simulate a "clean" close from a script?

Thank you!
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: How to close nicely a wine application from script

Post by vitamin »

anto12358 wrote:I need to close nicely (i.e. just like pressing the x button on the window) a wine application (in this case uTorrent) from a script.

Code: Select all

wineboot -e
anto12358
Level 1
Level 1
Posts: 5
Joined: Sun Jan 15, 2012 7:43 am

Re: How to close nicely a wine application from script

Post by anto12358 »

vitamin wrote:

Code: Select all

wineboot -e
I don't see how I can use this to close a single Wine application without affecting the others too.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: How to close nicely a wine application from script

Post by vitamin »

anto12358 wrote:I don't see how I can use this to close a single Wine application without affecting the others too.
You can't. Put them into separate wineprefixes.
anto12358
Level 1
Level 1
Posts: 5
Joined: Sun Jan 15, 2012 7:43 am

Post by anto12358 »

I've found an easier way: use a Windows task kill application like taskkill.exe (shipped with Windows XP) or this:

http://technet.microsoft.com/en-us/sysi ... s/bb896683
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

anto12358 wrote:I've found an easier way: use a Windows task kill application like taskkill.exe (shipped with Windows XP)
Indeed. Forgot that Wine has that one too.
Locked