luit: Cygwin compatibility
Mark Kettenis
mark.kettenis at xs4all.nl
Tue Oct 6 08:38:50 PDT 2009
> From: Adam Jackson <ajax at nwnk.net>
> Date: Tue, 06 Oct 2009 11:21:13 -0400
>
> On Mon, 2009-10-05 at 19:08 -0500, Yaakov (Cygwin/X) wrote:
>
> > Cygwin has O_NOCTTY but no TIOCSCTTY, so the tty is never made=20
> > controlling. This raises two questions:
> >=20
> > 1) What is the point of O_NOCTTY if TIOCSCTTY is called right afterwards?
>
> Hah! Can't think of one.
But I can. The TIOCSCTTY ioctl will fail if the process already has a
controlling tty (even if the current controlling tty is the same as
the tty you want to make controlling). So you need to open the tty
with O_NOCTTY to make sure this doesn't happen.
More information about the xorg-devel
mailing list