From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17791 invoked by alias); 16 Feb 2019 17:43:19 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 17767 invoked by uid 89); 16 Feb 2019 17:43:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-100.9 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.133) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 16 Feb 2019 17:43:17 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MGQWr-1gpsv12kpx-00GuJ5 for ; Sat, 16 Feb 2019 18:43:14 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id 03437A80677; Sat, 16 Feb 2019 18:43:13 +0100 (CET) Date: Sun, 17 Feb 2019 00:11:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: textmode for stdout, what is "correct" now? Message-ID: <20190216174313.GG4256@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20190214162002.GA4950@calimero.vinschen.de> <6aa280c2-4769-0772-91d9-c73a3a3d9680@ssi-schaefer.com> <20190215102251.GA2702@calimero.vinschen.de> <20190215124844.GE2702@calimero.vinschen.de> <6d02258d-115d-135c-1404-1b02eec34045@ssi-schaefer.com> <20190215203108.GN2702@calimero.vinschen.de> <20190216093855.GR2702@calimero.vinschen.de> <863f060b-9c2f-1c78-30e8-c1486d567f74@ssi-schaefer.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hwvH6HDNit2nSK4j" Content-Disposition: inline In-Reply-To: <863f060b-9c2f-1c78-30e8-c1486d567f74@ssi-schaefer.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-02/txt/msg00234.txt.bz2 --hwvH6HDNit2nSK4j Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1433 On Feb 16 18:13, Michael Haubenwallner wrote: > On 2/16/19 10:38 AM, Corinna Vinschen wrote: > > setmode(fd, O_BINARY) works on Cygwin. >=20 > Well... true. >=20 > What I'm trying to say is that restoring the *default* mode is currently= =20 > broken, because traditionally the default mode simply is called "text > mode" - which is enough for DOS only systems, but confusing in Cygwin. >=20 > As for Cygwin the default mode is more complex, we may want to call it > something like the "Cygwin text mode" instead. Consequently, the mode > that does force \r should be called the "DOS text mode". >=20 > Whether the "Cygwin text mode" is with or without \r depends on some > other property like the text mount. >=20 > However, after setting the "binary mode", libraries like openssl BIO > want to be able to restore the "non-binary mode" - whatever name it > may have. So they use the only available API: setmode(fd, O_TEXT). > And IMO they're right to expect the "Cygwin text mode" on Cygwin. >=20 > If they really need the "DOS text mode", they either should handle the > \r in binary mode - or we provide some new setmode(fd, O_DOSTEXT) API. >=20 > In hope to be more clear now, > /haubi/ I really miss the problem you're trying to solve here. Why should an application setting O_BINARY explicitely revert this decision on the same file descriptor? That doesn't make sense. Corinna --=20 Corinna Vinschen Cygwin Maintainer --hwvH6HDNit2nSK4j Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlxoS7EACgkQ9TYGna5E T6AFeA//e0LWJCK1mM4UbS70PTuqfZ/vgmd6VQUeVailL7TgL4v26wvU8P/lGq/C SXSXEY5SmG2uoYDJrS8Tsc0hnL3volymE39mTVq+wslbVvB6JUcdMnvMlFqPJgra xfjT2quXpunTHXSmjAnPRu+jOikocSs1d2mbBA8ypUB9IHKxBLwNXWAqztF5SFWA 5yFnAk/Uq8nUgjaX97xAWZ7qlk7vKjvQBVzJxTTDIcEHreCBerkMKugPOiOLJIbU 5y4nlgLvMlHHmv7vweRGfo+Chjv5ChLKvH5dzj05jjef2NEkZOGUI4cUqrEK9eVy TpdFLgx6x4ZxFKYFTiycGnxYt+7IyR9B+FuVxOnNRIq7rbUhLN9irt7rSgZ8xUvt aI9lpip9BLPa0xzavNYVHl7/K9d6puwrzQd5cLwBu2FniFrW99FHKv+xqodPyWaV 4IVaptraY7wavZoN3qhHKkidYGs1xG02wXs1o/tvnIiXyywjAQj3NYFaeN4CeUy+ SfDihUZiqmbbc3Rc2viFWUzBiGfinNCaSYhmB1udZSfOkF6JCFbbQ0pT9dDjn9fP aeTpin+9rkFRHB4E4zg3LoDU/psjRJ/Impxny/5jfKaSnjLca7K8f5WIePt3LxWC ljtTOKMJfBiVbcth1hkmwkPbMsJxuNBxCgUxTzOjFUyuqct95L8= =mu/W -----END PGP SIGNATURE----- --hwvH6HDNit2nSK4j--