delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/11/08/00:53:39

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY
X-Spam-Check-By: sourceware.org
X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o-
Date: Tue, 8 Nov 2011 00:53:06 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: ptsname_r
Message-ID: <20111108055306.GA11449@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4EB82DF9 DOT 7080408 AT redhat DOT com> <20111107193521 DOT GA30056 AT ednor DOT casa DOT cgf DOT cx> <4EB8437B DOT 5090600 AT redhat DOT com>
MIME-Version: 1.0
In-Reply-To: <4EB8437B.5090600@redhat.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
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 Mon, Nov 07, 2011 at 01:45:47PM -0700, Eric Blake wrote:
>On 11/07/2011 12:35 PM, Christopher Faylor wrote:
>> On Mon, Nov 07, 2011 at 12:14:01PM -0700, Eric Blake wrote:
>>> Since ptsname() is not thread-safe on all platforms, it would be nice if
>>> cygwin could also export ptsname_r() to match glibc.
>>>
>>> If no one beats me to it, I'll try and submit patches this week.
>>
>> I'll do it.  I've been in this code recently so it's fresh in my mind.
>
>Thanks.  Also, even with your patches of today, ptsname() is still not 
>thread-safe; should we be sticking that in a thread-local buffer rather 
>than in static storage, similar to how other functions like strerror() 
>are thread-safe?

Why would we do that when it hasn't been thread-safe for years and it is
acceptable behavior for it not to be.  The thread-local storage is
precious and I don't see a pressing need for this to be thread-safe.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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