From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8522 invoked from network); 7 May 2001 19:54:00 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 May 2001 19:54:00 -0000 Received: (qmail 12125 invoked by alias); 7 May 2001 19:53:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14249 Received: (qmail 12114 invoked from network); 7 May 2001 19:53:50 -0000 From: "Bart Schaefer" Message-Id: <010507124740.ZM27941@candle.brasslantern.com> Date: Mon, 7 May 2001 12:47:39 -0700 In-Reply-To: =?iso-8859-1?Q?=3CE14wpXB-0008aM-00=40f9=2Email=2Eru=3E?= =?iso-8859-1?Q?Comments=3A_In_reply_to_=22=E1=CE=C4=D2=C5=CA_=E2=CF=D2=DA?= =?iso-8859-1?Q?=C5=CE=CB=CF=D7=22_=3Carvidjaar=40mail=2Eru=3E?= =?iso-8859-1?Q?________=22Fix_for_zpty_under_Cygwin=22_=28May__7=2C_10=3A?= =?iso-8859-1?Q?15pm=29?= References: X-Mailer: Z-Mail Lite (5.0.0 30July97) To: =?iso-8859-1?Q?=22=E1=CE=C4=D2=C5=CA_=E2=CF=D2=DA=C5=CE=CB=CF=D7=22?= Subject: Re: Fix for zpty under Cygwin Cc: zsh-workers@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On May 7, 10:15pm, =E1=CE=C4=D2=C5=CA =E2=CF=D2=DA=C5=CE=CB=CF=D7 wrote: > Subject: Fix for zpty under Cygwin > = > It was O_NOCTTY. Looks like O_NOCTTY is "sticky" under Cygwin and > prevents this tty from becoming ctty when dup()'ing it later. I do not > remeber when it was put in, so there are two possibilities: > = > - we added this and that broke things That's probably it; I copied that part from clone.c along with several other changes (rev 1.15). > 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. > Related problem is testing. Completion tests consistently failed; the > reason was this line in comptest: > > zpty -b zsh "$comptest_zsh -f +Z" The -b was added in 13035 when non-blocking mode was the default and -b selected blocking mode, then never removed when the default switched agai= n in 13120. This was my error; the -b should not be there.