This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2 v2] openpty: use TIOCGPTPEER to open slave side fd
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Christian Brauner <christian dot brauner at ubuntu dot com>
- Cc: <libc-alpha at sourceware dot org>, <stgraber at stgraber dot org>, <serge at hallyn dot com>, <fweimer at redhat dot com>
- Date: Mon, 28 Aug 2017 12:22:34 +0000
- Subject: Re: [PATCH 2/2 v2] openpty: use TIOCGPTPEER to open slave side fd
- Authentication-results: sourceware.org; auth=none
- References: <3496d984-a55e-d56b-2c25-a23200327dca@redhat.com> <20170828121106.2629-1-christian.brauner@ubuntu.com>
On Mon, 28 Aug 2017, Christian Brauner wrote:
> + /* Try to allocate slave fd solely based on master fd first. */
> + slave = ioctl (master, TIOCGPTPEER, O_RDWR | O_NOCTTY);
You still need the #ifdef. openpty is used on non-Linux systems, and the
oldest kernel headers supported for building glibc are 3.2.
--
Joseph S. Myers
joseph@codesourcery.com