From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13248 Path: news.gmane.org!.POSTED!not-for-mail From: "A. Wilcox" Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] return EBADF from ttyname_r Date: Wed, 12 Sep 2018 22:23:37 -0500 Organization: =?UTF-8?Q?Ad=c3=a9lie_Linux?= Message-ID: <1318220c-7daa-053f-12a8-9f4a41cb4b61@adelielinux.org> References: <20180913003424.12234-1-benjamin@python.org> <20180913020734.GG1878@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MFVtetXUZ0Y8XbPb3hp5wpyckNWQESHVY" X-Trace: blaine.gmane.org 1536808838 2640 195.159.176.226 (13 Sep 2018 03:20:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2018 03:20:38 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 To: musl@lists.openwall.com Original-X-From: musl-return-13264-gllmg-musl=m.gmane.org@lists.openwall.com Thu Sep 13 05:20:34 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1g0IBF-0000aX-SG for gllmg-musl@m.gmane.org; Thu, 13 Sep 2018 05:20:33 +0200 Original-Received: (qmail 8015 invoked by uid 550); 13 Sep 2018 03:22:43 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 7997 invoked from network); 13 Sep 2018 03:22:42 -0000 Openpgp: preference=signencrypt In-Reply-To: <20180913020734.GG1878@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:13248 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --MFVtetXUZ0Y8XbPb3hp5wpyckNWQESHVY Content-Type: multipart/mixed; boundary="eNq44zwkgps6dvYmQYhCEAkDfQMgb00oM"; protected-headers="v1" From: "A. Wilcox" To: musl@lists.openwall.com Message-ID: <1318220c-7daa-053f-12a8-9f4a41cb4b61@adelielinux.org> Subject: Re: [musl] [PATCH] return EBADF from ttyname_r References: <20180913003424.12234-1-benjamin@python.org> <20180913020734.GG1878@brightrain.aerifal.cx> In-Reply-To: <20180913020734.GG1878@brightrain.aerifal.cx> --eNq44zwkgps6dvYmQYhCEAkDfQMgb00oM Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 09/12/18 21:07, Rich Felker wrote: > The EBADF error for isatty is optional and musl's does not set it, so > this patch does not work as-is. I think returning ENOTTY for cases for > which it does not apply in ttyname_r is non-conforming though, so > some change similar to this is probably needed. If isatty were > modified to set errno, I think we could just return errno here. >=20 > Rich >=20 Please do feel free to work on isatty's error handling, though, Benjamin (or others). It is non-conformant as it stands; it returns 0 for /dev/null and it does not error on a closed fd. We're tracking this and other issues at the following URL (but note, it's a little bit behind and a few have been fixed since): https://wiki.adelielinux.org/wiki/POSIX Best, --arw --=20 A. Wilcox (awilfox) Project Lead, Ad=C3=A9lie Linux https://www.adelielinux.org --eNq44zwkgps6dvYmQYhCEAkDfQMgb00oM-- --MFVtetXUZ0Y8XbPb3hp5wpyckNWQESHVY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjNyWOYPU1SaTSMHHyynLUZIrnRQFAluZ2DkACgkQyynLUZIr nRSbUA/7B5411mdx8J2W9eaCRH+bifUZ96zseoZGqSxXAXHS9nLHTkOsxx95a6m+ BvMsPLxpVtMzXOmUCRXfBQ2gVsmLXpj6k5qEYxD6A6Exn1fZvskteb6iyV/Y4y2j KCbspUi1aKGTn5ISet6Z+PNBzLXlpB7+iuJ6xz8XP5gTHw8zFsLMIWUCRCY7Zy4n qb/5s9aBdsUBzJ1D8rJKTIcI9hn4wVURD8yeHGDi/Mhambcej/dhEkQZPYcRpzTc ehO8gpqWfJqCvnC8elCs3JER6dpEWdciXg+hiTRt4x7LJG30erCE4Y1t/jp5hX3S OEZHH2VrcyWJKbrThjfdrpVTq01nc3Go5GFLTRZfcSea8TO/g85mz3iKqyPEhtpw NrAjh45QDfshZsM5mLEAXCCIDRu9wlMjD7XdBxjb/2zjlVNX2BjnTWGx4Dzy3JDs Ifi/BAD7fplmfIf/YNzv4mpOr04xxXyScQ9X5YpIz8PgiYjiTjbmElB30ySE4fwk s4dx9nOwU0n/03C+p5YQ6wV+aQ/J61MMMN/3dL+o+n3/UqLDor0+gaOWzdVDYwRk KEH6ubs6H7NsFaNNvrrVOx8YVzRf7xNkRkoQ6mikQ/sBxWasYiG/dL6+eSGqcPgx b7xqYLyyoi2T8LYHVtBpx7IS33The9pMeIamqn3DnPoLMsM0yao= =/TFK -----END PGP SIGNATURE----- --MFVtetXUZ0Y8XbPb3hp5wpyckNWQESHVY--