msvcrt: Handle of thread created by _beginthread should not be closed on thread detach.
authorPaul Gofman <gofmanp@gmail.com>
Mon, 1 Feb 2016 12:16:01 +0000 (15:16 +0300)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 1 Feb 2016 12:41:22 +0000 (21:41 +0900)
commitfaf59e5f06a9ccf1bb6ae83716e68f63b883c001
treeab00bb121fc2b7ea5ab58f2cf62bb51a0a93dcac
parent567f83a3172ca8fef877bc2f60694f8f83ec5231
msvcrt: Handle of thread created by _beginthread should not be closed on thread detach.

Handle should be closed if _endthread is called or thread function
exits. If thread is terminated by ExitThread or _endthreadex, thread
handle remains valid.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/msvcrt/main.c
dlls/msvcrt/tests/misc.c
dlls/msvcrt/thread.c