This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: posix_openpt vs getpt??
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Samuel Thibault <samuel dot thibault at gnu dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 31 Dec 2019 17:53:16 +0100
- Subject: Re: posix_openpt vs getpt??
- References: <20191230213550.icqt2er7dwnxcrrb@function> <87a778mxta.fsf@mid.deneb.enyo.de> <20191231163803.rbcctlhvyhwdrxqv@function> <20191231164525.ps7mpnh3p4huxlu3@function>
* Samuel Thibault:
> One thing I'm unsure of: the Linux manpage says
>
> It is equivalent to
>
> open("/dev/ptmx", O_RDWR | O_NOCTTY);
>
> But the Linux implementation is
>
> int fd = __posix_openpt (O_RDWR);
>
>
> Is getpt supposed to set the controlling tty or not? Since the Linux
> behavior has been not to set O_NOCTTY since its introduction in 1998, I
> guess applications assumes !O_NOCTTY and it's the manpage which needs to
> be fixed?
I'm not sure if O_NOCTTY actually has an impact here. Does /dev/ptmx
actually qualify as a terminal device?
In any case, I agree that the manual page should be fixed. Would you
submit a patch, please?