[PATCH 2/2] kernel32/tests: Close all handles on process exit.

Dmitry Timoshkov dmitry at baikal.ru
Thu Nov 16 21:56:50 CST 2017


Zebediah Figura <z.figura12 at gmail.com> wrote:

> @@ -2149,7 +2153,6 @@ static void child_process(const char *dll_name, DWORD target_offset)
>      case 3:
>          trace("signalling thread exit\n");
>          SetEvent(stop_event);
> -        CloseHandle(stop_event);
>          break;

This one is a real bug, thanks for tracking it down.

> +    CloseHandle(loader_lock_event);
> +    CloseHandle(peb_lock_event);
> +    CloseHandle(heap_lock_event);
> +    CloseHandle(ack_event);
> +    CloseHandle(stop_event);
> +    CloseHandle(process);
> +    /* Don't close event, mutex and semaphore here; we want to test if they are
> +     * abandoned on process termination. */
> +
>      trace("call ExitProcess(195)\n");
>      ExitProcess(195);
>  }

Please don't add these CloseHandle() calls, they clutter the code and don't do
anything useful.

-- 
Dmitry.



More information about the wine-devel mailing list