Message 76086 - Python tracker (original) (raw)

With cygwin, calling sem_wait() in the DLL_THREAD_DETACH section of a DllMain function can crash the program. See attached zip file, it contains two C files which only include pthread.h and semaphore.h (no python, no openssl). The resulting program crashes ~30% of the time.

If this pattern (in dll.c) is not allowed, it's a problem in the openssl code. If it is allowed, it's a bug in cygwin's threads implementation.

We should really move this discussion to cygwin. This is no more a python issue.