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. --Juan
[1] http://blogs.msdn.com/michen/archive/2008/04/04/Application-termination-when... [2] http://blogs.msdn.com/oldnewthing/archive/2008/04/21/8413175.aspx