eidheim/tiny-process-library

CloseHandle called on invalid handles

5cript opened this issue · 1 comments

CloseHandle(process_info.hProcess);
CloseHandle(process_info.hThread);

These handles are invalid here and should not be closed. This will overwrite "GetLastError" with 6 = "Invalid Handle", so reading the error value to see what went wrong becomes impossible.

Thank you for reporting this. Fixed as you proposed in the above commit.