X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: RE: Inter-Process Mutexes Date: Wed, 6 Sep 2006 11:26:57 +0100 Message-ID: <00c701c6d19e$fb2d0f30$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <20060904082849.GB4461@implementation.labri.fr> Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k86ARAhC023847 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/