X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-7.5 required=5.0	tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4EB8437B.5090600@redhat.com>
Date: Mon, 07 Nov 2011 13:45:47 -0700
From: Eric Blake <eblake@redhat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110928 Fedora/3.1.15-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.4 Thunderbird/3.1.15
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: ptsname_r
References: <4EB82DF9.7080408@redhat.com> <20111107193521.GA30056@ednor.casa.cgf.cx>
In-Reply-To: <20111107193521.GA30056@ednor.casa.cgf.cx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.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 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?

-- 
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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

