shell32/tests: Fix a ShellExecute() race condition.

On Windows XP SP1 a ShellExecute() call that is supposed to fail
succeeds instead. This means the child process is started but
ShellExecute() returns without waiting for it, resulting in a race
condition on the child's results file. So use our shell_execute_ex()
wrapper instead as it always waits for the child process.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Francois Gouget 2016-02-08 05:24:45 +01:00 committed by Alexandre Julliard
parent cc240bdb14
commit f4130de33e
1 changed files with 2 additions and 1 deletions

View File

@ -1844,7 +1844,8 @@ static void test_fileurls(void)
return;
}
rc = (INT_PTR)ShellExecuteA(NULL, NULL, "file:///nosuchfile.shlexec", NULL, NULL, SW_SHOWNORMAL);
rc = shell_execute_ex(SEE_MASK_FLAG_NO_UI, NULL,
"file:///nosuchfile.shlexec", NULL, NULL, NULL);
if (rc > 32)
{
win_skip("shell32 is too old (likely < 4.72). Skipping the file URL tests\n");