delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/11/06/10:46:12

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 6 Nov 2007 16:45:50 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: why is pthread_key_create failing?
Message-ID: <20071106154550.GB1203@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <200711061512 DOT 15518 DOT bruno AT clisp DOT org> <20071106153026 DOT GA1203 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20071106153026.GA1203@calimero.vinschen.de>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

On Nov  6 16:30, Corinna Vinschen wrote:
> On Nov  6 15:12, Bruno Haible wrote:
> > Hi,
> > 
> > In the test program below, pthread_key_create is failing with return value
> > EBUSY with no good reason.
> > [...]
> > The Cygwin version that I'm using is:
> > $ grep VERSION /usr/include/cygwin/version.h | head -2
> > #define CYGWIN_VERSION_DLL_MAJOR 1005
> > #define CYGWIN_VERSION_DLL_MINOR 19
> 
> Time to update.
> 
> However, regardless of the version you're using, it's a bug in Cygwin.
> The pthread_key_create function checks the incoming pthread_key_t pointer
> for being a valid object already and,if so, bails out with EBUSY.  This
> is arguably wrong, as your example shows, which reuses pthread_key_t
> slots already used before.  Besides, EBUSY isn't defined as a valid
> error code returned by pthread_key_create.

Heh, I just re-read the whole discussion at
http://www.mail-archive.com/cygwin%40cygwin.com/msg49835.html again,
and it's interesting how the point of view changes with another
testcase.  Pity.  Returning EBUSY really looked like a good idea.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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