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 | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) base-commit: 7c2ef319c52c4997256f5807564523dfd4acdfc7 Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1406%2FAtariDreams%2Fjoin-v11 Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1406/AtariDreams/join-v11 Pull-Request: https://github.com/git/git/pull/1406 Range-diff vs v10: 1: e0cc43efc6c = 1: e0cc43efc6c win32-pthread: prepare pthread.c for change by formatting 2: d05d4c2e4b2 ! 2: c5d2ddad166 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 */ - return err_win_to_posix(GetLastError()); ++ errno = err_win_to_posix(GetLastError()); ++ return errno; } } + -- gitgitgadget