[2/3] wineboot: Terminate processes immediately after WM_ENDSESSION.

Juan Lang juan.lang at gmail.com
Thu Dec 10 13:20:41 CST 2009

Hi Vincent,

-    /* 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)

I'm confused why you removed the timeout.  The documented behavior[1,
2] is to wait a short timeout, show a dialog if the app hasn't quit by
then, then kill it.  This change makes wineboot terminate a process
immediately.  Is this really necessary to fix the bug?  I'd expect
that you want to handle the WAIT_OBJECT_0 case in addition to the
WAIT_TIMEOUT case, and leave the timeout alone.

[1] http://blogs.msdn.com/michen/archive/2008/04/04/Application-termination-when-user-logs-off.aspx
[2] http://blogs.msdn.com/oldnewthing/archive/2008/04/21/8413175.aspx

More information about the wine-devel mailing list