From 1bfbcefb60bd4e0ffc0dbb7dc7d14bb4d319e75c Mon Sep 17 00:00:00 2001 From: Peter Oberndorfer Date: Fri, 2 Mar 2007 16:12:54 +0100 Subject: [PATCH] ntdll: Make exception test not hang when creating process fails. --- dlls/ntdll/tests/exception.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index 08ec9c650c7..07f4bc6121e 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -591,6 +591,7 @@ static void test_debugger(void) PVOID code_mem_address = NULL; NTSTATUS status; SIZE_T size_read; + BOOL ret; int counter = 0; si.cb = sizeof(si); @@ -601,8 +602,10 @@ static void test_debugger(void) } sprintf(cmdline, "%s %s %s", my_argv[0], my_argv[1], "debuggee"); - ok(CreateProcess(NULL, cmdline, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, - &si, &pi) != 0, "error: %u\n", GetLastError()); + ret = CreateProcess(NULL, cmdline, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &si, &pi); + ok(ret, "could not create child process error: %u\n", GetLastError()); + if (!ret) + return; do {