Alexandre Julliard : winemenubuilder: Process messages while waiting for the semaphore or the parent process.

Alexandre Julliard julliard at winehq.org
Tue Apr 22 06:47:15 CDT 2008


Module: wine
Branch: master
Commit: de139bf028c5cf445649ff4fbfba3f34806e0380
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=de139bf028c5cf445649ff4fbfba3f34806e0380

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Apr 21 20:34:30 2008 +0200

winemenubuilder: Process messages while waiting for the semaphore or the parent process.

---

 programs/winemenubuilder/winemenubuilder.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index 9ea739d..7d9632d 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -1180,7 +1180,7 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bWait )
     /* running multiple instances of wineshelllink
        at the same time may be dangerous */
     hsem = CreateSemaphoreA( NULL, 1, 1, "winemenubuilder_semaphore");
-    if( WAIT_OBJECT_0 != WaitForSingleObject( hsem, INFINITE ) )
+    if( WAIT_OBJECT_0 != MsgWaitForMultipleObjects( 1, &hsem, FALSE, INFINITE, QS_ALLINPUT ) )
     {
         WINE_ERR("failed wait for semaphore\n");
         goto cleanup;
@@ -1243,7 +1243,7 @@ static BOOL WaitForParentProcess( void )
         goto done;
     }
 
-    if (WaitForSingleObject( hprocess, INFINITE ) == WAIT_OBJECT_0)
+    if (MsgWaitForMultipleObjects( 1, &hprocess, FALSE, INFINITE, QS_ALLINPUT ) == WAIT_OBJECT_0)
         ret = TRUE;
     else
         WINE_ERR("Unable to wait for parent process, error %d\n", GetLastError());




More information about the wine-cvs mailing list