2011-04-02 Jon TURNEY * thread.cc (semaphore::init): We cannot reliably infer anything from the existing contents of sem, so merely warn rather than return EBUSY if it looks like we are reinitialising a semaphore. Index: winsup/cygwin/thread.cc =================================================================== --- winsup.orig/cygwin/thread.cc 2011-04-02 13:07:03.000000000 +0100 +++ winsup/cygwin/thread.cc 2011-04-02 14:34:39.546875000 +0100 @@ -3198,11 +3198,14 @@ int semaphore::init (sem_t *sem, int pshared, unsigned int value) { - /* opengroup calls this undefined */ + /* + We can't tell the difference between reinitialising an + existing semaphore and initialising a semaphore who's + contents happen to be a valid pointer + */ if (is_good_object (sem)) { - set_errno(EBUSY); - return -1; + paranoid_printf ("potential attempt to reinitialise a semaphore"); } if (value > SEM_VALUE_MAX)