From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42128 invoked by alias); 30 Jun 2017 08:58:07 -0000 Mailing-List: contact newlib-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-owner@sourceware.org Received: (qmail 42108 invoked by uid 89); 30 Jun 2017 08:58:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*MI:sk:2017063, H*i:sk:2017063, H*f:sk:2017063, H*M:JavaMail X-HELO: dedi548.your-server.de Received: from dedi548.your-server.de (HELO dedi548.your-server.de) (85.10.215.148) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Jun 2017 08:58:03 +0000 Received: from [88.198.220.130] (helo=sslproxy01.your-server.de) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1dQrkX-0007Wi-Ba for newlib@sourceware.org; Fri, 30 Jun 2017 10:58:01 +0200 Received: from [82.135.62.35] (helo=mail.embedded-brains.de) by sslproxy01.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dQrkW-0000ct-VU for newlib@sourceware.org; Fri, 30 Jun 2017 10:58:01 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 9CCB12A004F for ; Fri, 30 Jun 2017 10:58:03 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id cvuUsji-jibg for ; Fri, 30 Jun 2017 10:58:03 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 591EC2A1677 for ; Fri, 30 Jun 2017 10:58:03 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id UxrD9wKWzsP2 for ; Fri, 30 Jun 2017 10:58:03 +0200 (CEST) Received: from zimbra.eb.localhost (zimbra.eb.localhost [192.168.96.204]) by mail.embedded-brains.de (Postfix) with ESMTP id 49DCD2A004F for ; Fri, 30 Jun 2017 10:58:03 +0200 (CEST) Date: Fri, 30 Jun 2017 08:58:00 -0000 From: Sebastian Huber To: newlib@sourceware.org Message-ID: <1068535433.14282.1498813082840.JavaMail.zimbra@embedded-brains.de> In-Reply-To: <20170630081306.GA6201@calimero.vinschen.de> References: <20170629122002.25614-1-sebastian.huber@embedded-brains.de> <20170629122002.25614-3-sebastian.huber@embedded-brains.de> <20170629183138.GY6201@calimero.vinschen.de> <20170630081306.GA6201@calimero.vinschen.de> Subject: Re: [PATCH v3 3/5] Introduce _REENT_GLOBAL_STDIO_STREAMS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017/txt/msg00539.txt.bz2 ----- Am 30. Jun 2017 um 10:13 schrieb Corinna Vinschen vinschen@redhat.com: > On Jun 30 07:43, Sebastian Huber wrote: >> On 29/06/17 20:31, Corinna Vinschen wrote: >> >> > And, JFYI, Cygwin will start to use it too after the next release:) >> >> There are some new problems with this change. We have no reference counting >> in the FILE objects, so a freopen(..., stdin), closes the global stdin FILE >> object (__sf[0]), etc. What works is a stdin = fopen(). I guess this could >> break existing applications. > > Erm... isn't that expected behaviour? stdin/stdout/stderr are global > objects, after all. They were never thread-local per POSIX. The stdin/stdout/stderr pointers are still thread-local with this option. Only the FILE objects itself are now global. If you do a stdin = fopen() you get a completely thread-local stdin. I have absolutely no idea why this stuff is thread-local in Newlib by default.