From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcLO7-0002Eg-JH for qemu-devel@nongnu.org; Tue, 14 May 2013 15:59:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UcLO2-0001ZI-Ua for qemu-devel@nongnu.org; Tue, 14 May 2013 15:59:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UcLO2-0001Z7-La for qemu-devel@nongnu.org; Tue, 14 May 2013 15:59:50 -0400 Message-ID: <519297B2.1040107@redhat.com> Date: Tue, 14 May 2013 13:59:46 -0600 From: Eric Blake MIME-Version: 1.0 References: <1368533121-30796-1-git-send-email-pbonzini@redhat.com> <201305141610.r4EGAvH4010042@d23av03.au.ibm.com> <20130514161524.GH25411@rox.home.comstyle.com> <519267E2.6080105@redhat.com> <51929059.5090102@redhat.com> In-Reply-To: <51929059.5090102@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2JFQPTVEWGIEJUOTFMSAO" Subject: Re: [Qemu-devel] [PATCH for-1.5] portability: pty.h is glibc-specific List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: Paolo Bonzini , Anthony Liguori , qemu-devel@nongnu.org, Brad Smith This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2JFQPTVEWGIEJUOTFMSAO Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/14/2013 01:28 PM, Laszlo Ersek wrote: > Not to argue with this, just a general note: most of whatever is > portable from the terminal IO interfaces belongs into indee= d. >=20 > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/termios.h.html= >=20 > Traditionally nonportable stuff related to pty allocation and > master-slave pairing has been "recently" standardized as well (as in, > SUSv3 / UNIX 03): >=20 > http://pubs.opengroup.org/onlinepubs/9699919799/functions/posix_openpt.= html >=20 > (+grantpt, ptsname, unlockpt; they seem to date back to SUSv1 / UNIX 95= ) >=20 > CC'ing Eric for the obligatory POSIX sanity check... :) Looks accurate. Still missing from POSIX is ptsname_r, although it might appear in the next revision ("Issue 8") in a few years: http://austingroupbugs.net/view.php?id=3D508 which means right now, POSIX has no thread-safe mechanism for determining the slave name after opening a master pty. Personally, I find the high-level BSD openpty() interface a lot nicer to use than the POSIX posix_openpt()/grantpt()/unlockpt()/ptsname() sequence, but it may come with its own pitfalls since it is not standardized (yet). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2JFQPTVEWGIEJUOTFMSAO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRkpeyAAoJEKeha0olJ0Nq+w4H+wajbE1IrJRWvjzfCgF9uuuD PoevXLh671VPAuqdsAOEbQZ/mjSI++a6qGM2xZxVrRh6jWr9M9qo0BnYJIU/q03Q 7a0oQaP8YOkyeOW8CI+U6J0OLRB+q7qp+LcoOcrFn+U6g3YIFs5yrvAy+zuxXRwz EW/E/UJzTq758HiZRkfeIICJlR8k97+eZpWWsw3BUnAc6JfHJf2DL/vxJzOyjQVL BoPR0GvZoSaGpWZxQshpV0wSHz9KZOxkDVo2ErsNElX7nP9WdrjX7qekEwqHRGw8 cYs4V35vkbRi8KDQQZqH0lDbEa0CLNKAanaFwpCtyNNHLvYaAooXyKAsJuiOAIU= =mRoI -----END PGP SIGNATURE----- ------enig2JFQPTVEWGIEJUOTFMSAO--