From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54361 invoked by alias); 30 Jun 2017 10:35:34 -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 54272 invoked by uid 89); 30 Jun 2017 10:35:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=involvement, H*i:sk:1068535, H*f:sk:1068535, H*c:application X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Jun 2017 10:35:30 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 363386B222 for ; Fri, 30 Jun 2017 10:35:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 363386B222 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=vinschen@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 363386B222 Received: from calimero.vinschen.de (ovpn-117-36.ams2.redhat.com [10.36.117.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03C748063B for ; Fri, 30 Jun 2017 10:35:29 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id B7011A8061B; Fri, 30 Jun 2017 12:35:27 +0200 (CEST) Date: Fri, 30 Jun 2017 10:35:00 -0000 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: [PATCH v3 3/5] Introduce _REENT_GLOBAL_STDIO_STREAMS Message-ID: <20170630103527.GD6201@calimero.vinschen.de> Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org 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> <1068535433.14282.1498813082840.JavaMail.zimbra@embedded-brains.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1ozVqH6bFr/3sC51" Content-Disposition: inline In-Reply-To: <1068535433.14282.1498813082840.JavaMail.zimbra@embedded-brains.de> User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017/txt/msg00541.txt.bz2 --1ozVqH6bFr/3sC51 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1257 On Jun 30 10:58, Sebastian Huber wrote: >=20 >=20 > ----- Am 30. Jun 2017 um 10:13 schrieb Corinna Vinschen vinschen@redhat.c= om: >=20 > > On Jun 30 07:43, Sebastian Huber wrote: > >> On 29/06/17 20:31, Corinna Vinschen wrote: > >>=20 > >> > And, JFYI, Cygwin will start to use it too after the next release:) > >>=20 > >> There are some new problems with this change. We have no reference cou= nting > >> in the FILE objects, so a freopen(..., stdin), closes the global stdin= FILE > >> object (__sf[0]), etc. What works is a stdin =3D fopen(). I guess this= could > >> break existing applications. > >=20 > > Erm... isn't that expected behaviour? stdin/stdout/stderr are global > > objects, after all. They were never thread-local per POSIX. >=20 > 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 > =3D fopen() you get a completely thread-local stdin. I have absolutely > no idea why this stuff is thread-local in Newlib by default. Me neither. This predates my involvement in newlib. I guess it sounded like a good idea at the time, to allow multiple, independent applets on bare metal systems. Corinna --=20 Corinna Vinschen Cygwin Maintainer Red Hat --1ozVqH6bFr/3sC51 Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJZVilvAAoJEPU2Bp2uRE+gGX8QAIr3+rmlvJmpmiycYIiE4iZV 7hhc9wv3ldCTbcNaeNFj3yYI6ViURCNISe5fgivF0EP5z8VJrxKyQVXPty+nRr2Z KgNoVHwsCf0V95WAdiZrk9pWQYMWmckwIrsYJLpmKGNb37iM4W07TZxhA/WLr4ef 10JkEq8YH5Vj+qkdaEVlFMzlYjpcWAFg+XSbXKE8Hdb9ohn3ZvrsRKjhT2CdOrF2 Sc4QuMZEiuCZ6ALWirwwxUM4nPY1iyI8xK5XzWW2zqnT26YmdWknoW8LZI5qOMq6 0AXbrW5FVo4vqFUiST1xWyaCpQMziPwteCQdxjBovK10JujqUJTFtmMQbWyxv9lH 0vLHJdF+EuIxLWgyXDNuBSV4vvCCG9HY3DK2X+GOKbxfURvQw4A+CTs8CauAp7yt Ks6g4Z3X162rAi6Yp7lYPUaIpxYWr6+U+8hHkpcI+SQEaTQB4RQIOX1kQsxfDbkh xHPbd0Q5iqO97QO0aExB7VYAXpO5QPY4tFFMGveFgrgkLrxF15eKn843+eVPsV+3 3mnAtqx19UuumsFfsDl2HiGjB8NwErjDb1pi3VdosbCkf9tOJbAlnr8H2GBuTuoI a+mWtKzm+NUDredYu0jFe6pDg2SKtuyi6U38NUHs+S9GXcdiIG+AX2mnsMdH5+ZN 6y74ZSAwZsPTvgVchD54 =cjzo -----END PGP SIGNATURE----- --1ozVqH6bFr/3sC51--