Module: wine
Branch: master
Commit: 0926dd96f69abc970709b4e5314e80c08c7d8d38
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0926dd96f69abc970709b4e53…
Author: Vincent Povirk <vincent(a)codeweavers.com>
Date: Thu Dec 10 12:35:18 2009 -0600
wineboot: Terminate processes immediately after WM_ENDSESSION.
Once a process returns from WM_ENDSESSION, we can assume it has finished
doing any cleanup it needs but will most likely not shut down on its own.
---
programs/wineboot/shutdown.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/programs/wineboot/shutdown.c b/programs/wineboot/shutdown.c
index 49c03c2..ed80bf0 100644
--- a/programs/wineboot/shutdown.c
+++ b/programs/wineboot/shutdown.c
@@ -31,7 +31,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(wineboot);
#define MESSAGE_TIMEOUT 5000
-#define PROCQUIT_TIMEOUT 20000
struct window_info
{
@@ -278,12 +277,13 @@ static DWORD_PTR send_end_session_messages( struct window_info *win, UINT count,
return 1;
}
- /* wait for app to quit on its own for a while */
- ret = WaitForSingleObject( process_handle, PROCQUIT_TIMEOUT );
+ /* Check whether the app quit on its own */
+ ret = WaitForSingleObject( process_handle, 0 );
CloseHandle( process_handle );
if (ret == WAIT_TIMEOUT)
{
- /* it didn't quit by itself in time, so terminate it with extreme prejudice */
+ /* If not, it returned from all WM_ENDSESSION and is finished cleaning
+ * up, so we can safely kill the process. */
HANDLE handle = OpenProcess( PROCESS_TERMINATE, FALSE, win[0].pid );
if (handle)
{
Module: wine
Branch: master
Commit: decf64b86c437303f2cec6a3a4b009d2f9448974
URL: http://source.winehq.org/git/wine.git/?a=commit;h=decf64b86c437303f2cec6a3a…
Author: Vincent Povirk <vincent(a)codeweavers.com>
Date: Thu Dec 10 12:19:49 2009 -0600
wineboot: Do not force --kill when --end-session is set.
The --kill switch ends processes from all desktops, but --end-session only
applies to the current desktop. This causes windows from other desktops to
dangerously close without notification that the session is ending.
---
programs/wineboot/wineboot.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c
index 2587ef5..60a51b7 100644
--- a/programs/wineboot/wineboot.c
+++ b/programs/wineboot/wineboot.c
@@ -956,7 +956,7 @@ int main( int argc, char *argv[] )
{
switch(optc)
{
- case 'e': end_session = kill = 1; break;
+ case 'e': end_session = 1; break;
case 'f': force = 1; break;
case 'i': init = 1; break;
case 'k': kill = 1; break;