delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/05/06/12:37:07

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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: Thu, 6 May 2004 12:36:42 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: pthreads and sockets - Cannot register window class error
Message-ID: <20040506163642.GF27589@coe.bosbc.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4098760F DOT CDB4F630 AT hot DOT pl> <4098E04B DOT 34D2866B AT dessent DOT net> <20040505210340 DOT GB321 AT coe DOT bosbc DOT com> <4099694C DOT DB07AC2E AT hot DOT pl> <Pine DOT CYG DOT 4 DOT 58 DOT 0405051852530 DOT 3220 AT fordpc DOT vss DOT fsi DOT com> <40998C6B DOT F5A44973 AT hot DOT pl> <Pine DOT CYG DOT 4 DOT 58 DOT 0405061109500 DOT 3220 AT fordpc DOT vss DOT fsi DOT com>
Mime-Version: 1.0
In-Reply-To: <Pine.CYG.4.58.0405061109500.3220@fordpc.vss.fsi.com>
User-Agent: Mutt/1.4.1i

On Thu, May 06, 2004 at 11:13:43AM -0500, Brian Ford wrote:
>On Thu, 6 May 2004, Jacek Trzmiel wrote:
>
>> Nevertheless ThreadingTest.cpp posted here:
>>
>> http://cygwin.com/ml/cygwin/2004-05/msg00178.html
>>
>> still sometimes fails, even with 20040504 snapshot:
>>
>> > $ g++ ThreadingTest.cpp -lpthread -o ThreadingTest.exe && ./ThreadingTest.exe
>> >     238 [win] ThreadingTest 1696 Winmain: Cannot register window class, Win32 error 1410
>> >     896 [win] ThreadingTest 1696 Winmain: Cannot register window class, Win32 error 1410
>
>It's an obvious race condition in winsup/cygwin/window.cc (gethwnd):
>ourhwnd.  I'm not quite sure how to fix it yet, and I've got to do real
>work now.  So, have at it :-).

This code has needed a complete rewrite for sometime.  Its use of static
buffers makes it a guaranteed race-full zone.

cgf

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019