On 06 September 2006 10:58, Samuel Thibault wrote: > Hi, > > Drake Baker, le Mon 04 Sep 2006 01:49:25 -0500, a crit : >> I have seen conflicting information on the web concerning inter-process >> mutexes in CYGWIN. I have seen outright statements that it is not >> supported, and I have seen statements that ALL mutexes are inter-process by >> default. Obviously, only one statement is currently correct. > > Both are true :) > > Windows provides inter-process mutexes (you just need to give a name to > CreateMutex ; every process that give the same name will get the same > mutex). But cygwin doesn't provide a pthread interface for it. PTW.
The underlying pthread implementation uses win32 CreateSemaphore, as it happens. See pthread_mutex::pthread_mutex in thread.cc. The pthread functions are not supposed to be inter-process, they are within-process only. As Václav pointed out, the answer is to set CYGWIN=server in the environment and use the SysV IPC functions. cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/