After joining threads, the handle to the original thread should be closed as it no longer needs to be open. Signed-off-by: Seija Kijin doremylover123@xxxxxxxxx Seija Kijin (2): win32-pthread: prepare pthread.c for change by formatting win32: close handles of threads that have been joined compat/win32/pthread.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) base-commit: 7c2ef319c52c4997256f5807564523dfd4acdfc7 Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1406%2FAtariDreams%2Fjoin-v12 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1406/AtariDreams/join-v12 Pull-Request: https://github.com/git/git/pull/1406 Range-diff vs v11: 1: e0cc43efc6c = 1: e0cc43efc6c win32-pthread: prepare pthread.c for change by formatting 2: c5d2ddad166 ! 2: fa5cbfa5e0c win32: close handles of threads that have been joined @@ compat/win32/pthread.c: int win32_pthread_join(pthread_t *thread, void **value_p + CloseHandle(thread->handle); return EINVAL; default: -- return err_win_to_posix(GetLastError()); + /* the wait failed, so do not detach */ -+ errno = err_win_to_posix(GetLastError()); -+ return errno; + return err_win_to_posix(GetLastError()); } } - -- gitgitgadget