X-Recipient: archive-cygwin@delorie.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@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: ptsname_r
Message-ID: <20111108055306.GA11449@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <4EB82DF9.7080408@redhat.com> <20111107193521.GA30056@ednor.casa.cgf.cx> <4EB8437B.5090600@redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4EB8437B.5090600@redhat.com>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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

