On Fri, 17 Feb 2023 12:56:06 +0800 Yeo Kai Wei wrote: > Hi All, > > Thanks for the help. > > It works now. > > So, the 2 things that were required > > 1. Adding the '/' in front of the semaphore name so that Cygwin can > recognise it > > #define SemaphoreName "/mysemaphore" > > 2. Changing the if check from if(semptr == (void*) -1) to if(semptr == > (sem_t*) 0)
No. You should use: if (semptr == SEM_FAILED) -- Takashi Yano <takashi.y...@nifty.ne.jp> -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple