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

This commit is contained in:
Alexandre Julliard 2008-04-21 20:34:30 +02:00
parent 6b30e61a1e
commit de139bf028
1 changed files with 2 additions and 2 deletions

View File

@ -1180,7 +1180,7 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bWait )
/* running multiple instances of wineshelllink /* running multiple instances of wineshelllink
at the same time may be dangerous */ at the same time may be dangerous */
hsem = CreateSemaphoreA( NULL, 1, 1, "winemenubuilder_semaphore"); 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"); WINE_ERR("failed wait for semaphore\n");
goto cleanup; goto cleanup;
@ -1243,7 +1243,7 @@ static BOOL WaitForParentProcess( void )
goto done; goto done;
} }
if (WaitForSingleObject( hprocess, INFINITE ) == WAIT_OBJECT_0) if (MsgWaitForMultipleObjects( 1, &hprocess, FALSE, INFINITE, QS_ALLINPUT ) == WAIT_OBJECT_0)
ret = TRUE; ret = TRUE;
else else
WINE_ERR("Unable to wait for parent process, error %d\n", GetLastError()); WINE_ERR("Unable to wait for parent process, error %d\n", GetLastError());