On Fri, Nov 30, 2012 at 1:42 PM, Jeffrey Walton <noloa...@gmail.com> wrote: > On Fri, Nov 30, 2012 at 12:24 PM, NuSkooler <nuskoo...@gmail.com> wrote: >> I think responses like this would be much more helpful without the FUD. > I have no fear since I don't suffer uncertainty. The macros are broken. > >> WaitForSingleObject() and WaitForMultipleObjects() return WAIT_ABANDONED if >> the mutex has been closed. WAIT_OBJECT_0 would only be expected if you >> didn't read the documentation. > Bullshit. Write some negative tests and see what you get back. You > will get everything from WAIT_FAILED to ERROR_INVALID_HANDLE.
#include <windows.h> #include <stdio.h> int main(int argc, char* argv[]) { HANDLE mutex = NULL; DWORD dwRet = WaitForSingleObject(mutex, INFINITE); DWORD dwErr = GetLastError(); printf("Result = %d, Error = %d\n", dwRet, dwErr); return 0; } Results in "Result = -1, Error = 6". That's WAIT_FAILED and INVALID_HANDLE_VALUE. Jeff ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org