Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re[2]: Fix for zpty under Cygwin

-----Original Message-----
From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
To: "Андрей Борзенков" <arvidjaar@xxxxxxx>
Date: Mon, 7 May 2001 12:47:39 -0700
Subject: Re: Fix for zpty under Cygwin

> > So the fix under Cygwin is quite simple - just
remove O NOCTTY.
> > Actually, I wonder what it does here at all - it is
exactly the
> > descriptor that *will* be ctty later.
> It will be ctty in the forked-off child that runs on
the pty, but we have
> to open the descriptor originally in the parent
before forking.  O NOCTTY
> is to prevent the pty from becoming the parent's
controlling terminal.

That's wrong. get_pty() has two threads - one is
executed in parent (master) and one in child after fork
(slave). So, sfd descriptor is opened just once in
child and fix looks applicable. I've tried it on my
Unix as well without any obvious ill effects.

Anyway, I suggested to put it under ifdef __CYGWIN__
for the time being to avoid last-time breaking on other
systems. It does fix things under Cygwin (it is nice to
convince Cygwin folks to change O_NOCTTY semantics of


Messages sorted by: Reverse Date, Date, Thread, Author