Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Fri, 8 Apr 2005 22:57:45 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: ipc, sockets and windows sp2 Message-ID: <20050408205745.GQ1471@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20050401121143 DOT GD1471 AT cygbert DOT vinschen DOT de> <424D5C64 DOT 5050706 AT smousseland DOT com> <20050401160749 DOT GH1471 AT cygbert DOT vinschen DOT de> <4250E410 DOT 1060708 AT smousseland DOT com> <20050404103824 DOT GS1471 AT cygbert DOT vinschen DOT de> <9305417ca9a2f2601ad20b83801d2f92 AT smousseland DOT com> <20050404142507 DOT GT1471 AT cygbert DOT vinschen DOT de> <5c59a962471bd65c3c3f3f44c37b8bf3 AT smousseland DOT com> <20050406111752 DOT GG1471 AT cygbert DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i On Apr 8 17:10, kraken+spam AT smousseland DOT com wrote: > it works for me too for the testcase i provided last time. > > But there is still some issues when you run several semaphore-using > program at the same time. [Insert swear-word here] > to reproduce it : > -compil last testcase with this modification : > > -- if (n_children < 20) > instead of > -- if (n_children < 1) > at the beginning of the main loop > > and change > -- usleep(10) > to > -- sleep(1) > so childs does not disappear too quickly. > > -compile it, and copy the binary in another place (like /tmp), so you > can run two instance of it (as semaphore key is created from the path, > must have different path). > > -then run both of them, you should see > --semaphore_lock: Identifier removed > messages, and your semaphores aren't locked. > > you can give -r 64 argument to cygserver to be sure that it is not a > query thread number issue. Again the thread synchronization was the culprit. I reworked it once again and I ran your testcase 5 times concurrently with different sleep values, some in the same, some in different directories. It works for me again. Please test and tell me that it solves all your problems and nothing's left, ok? Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/