Last active
December 14, 2015 13:29
-
-
Save bionicbeagle/5094066 to your computer and use it in GitHub Desktop.
So GetExitCodeProcess() returns TRUE (for success) even if you pass it a non-process handle. Thanks, I guess! This in conjunction with another bug which caused some code to keep using (and keep CLOSING) a process handle which had already been closed caused random lock-ups in an application and I spent several days looking for the root cause :/ B…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HANDLE h = CreateEvent(NULL, TRUE, FALSE, NULL); | |
DWORD dwExitCode = 9999; | |
if (GetExitCodeProcess(h, &dwExitCode)) | |
{ | |
printf("Developers, developers, developers!"); | |
CloseHandle(h); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment