From: Piotr Caban piotr@codeweavers.com
--- dlls/ucrtbase/tests/file.c | 7 +++++-- include/wine/test.h | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/ucrtbase/tests/file.c b/dlls/ucrtbase/tests/file.c index 47971c76f95..379bbd012e2 100644 --- a/dlls/ucrtbase/tests/file.c +++ b/dlls/ucrtbase/tests/file.c @@ -229,6 +229,7 @@ static void test_utf8(const char *argv0) struct _finddata64i32_t fdata64i32; struct _finddata32_t fdata32; struct _finddata64_t fdata64; + PROCESS_INFORMATION info; intptr_t hfind, hproc; WCHAR bufW[256], *pW; struct _stat64 stat; @@ -446,8 +447,10 @@ static void test_utf8(const char *argv0) env[1] = NULL; hproc = _spawnle(_P_NOWAIT, argv0, argv0, "file", "utf8", file, NULL, env); ok(hproc != -1, "_spawnl returned %Id, errno %d\n", hproc, errno); - wait_child_process((HANDLE)hproc); - CloseHandle((HANDLE)hproc); + memset(&info, 0, sizeof(info)); + info.hProcess = (HANDLE)hproc; + info.dwProcessId = GetProcessId(info.hProcess); + wait_child_process(&info);
setlocale(LC_ALL, "C"); } diff --git a/include/wine/test.h b/include/wine/test.h index 6b24eb10ee8..decf7ca2a17 100644 --- a/include/wine/test.h +++ b/include/wine/test.h @@ -717,8 +717,7 @@ void winetest_wait_child_process( const PROCESS_INFORMATION *info )
if (!CloseHandle( info->hProcess )) ok( 0, "failed to close process handle, error %lu\n", GetLastError() ); - if (!CloseHandle( info->hThread )) - ok( 0, "failed to close thread handle, error %lu\n", GetLastError() ); + CloseHandle( info->hThread ); } }