From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10039 invoked by alias); 26 Nov 2014 14:51:33 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33800 Received: (qmail 18494 invoked from network); 26 Nov 2014 14:51:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1417013481; bh=KZ/gJI3SiMahCXgs0P5B+KFk7qmMEgb4nXOFPIzW9mw=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=RBmwoVzPm5CcoD2PY4TqSkBFR0x/ZWC7pZmyejODukdNY+VhXYFtcCIAsUywP8KsHxUUptLcq1q1QHqSraQSAbkUmhapa8KVCDwY8dNCqFBO0lWU7UpEZsclvI7C1A6ZyjlmVGz7a1qcPVI/qq6JeAHwEFZdvtxpVcjaksqIcE9RBgRaCxdrrfI3y13twAT5iCTP4Cv45DMba73Yy6iCt79Kpb09MGE00Ia+gSHJ4sOgfECj/uwgGioTW4455TGEGA/cuh1JiHWI83GbGFF+kAuTcN3/Pb8YwBQz/ynRzz5VjOCZICVGvEWzT3y9TUzm9y33yo/tEt0gs3mEqEFTkQ== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.co.uk; b=tYNGlp6HPFX46nAXYKEY3vz3rTc8o20ubDaqXJgSKllC1l6klXV3eENArVxiDkEGX53rLsoNmPrZmywVR+nIKIpHG8z8LF8HkyZU3Pgxp5oBAoexhNThxPqqZKy04zKzerWvAU4NsroqAklHSMpfEAMcOTtJWgq5js6OPZp0+s9ucvO05JEWWPkN1F2noBojFgrCuUDAA2XyjB6hJWoO1yjdsnU+PgTpj524kcrV2NDpLbjL2Cekk8vBYKRY5ZoJWLE3r/snKWkVANufJgUYLXYhTHMx0s+pndgFNfzHHti7wMKqsBx6+0wTby5OpP4TdFR/WeuWzf9GyfPTu6sA/A==; X-Yahoo-Newman-Id: 556535.72545.bm@smtp136.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: kyXGA7IVM1lAx0U.C9uQBjVGucF98ybr6r6YTCNu28NPWDN DZHpcbLG3kNplxykuCTn1HnJrCJHebkHTHx4_C4M.zK6IxFB3NaqkfIrBGQF fIPX1Gsr55uytI41fr6qKx4nY.0yis4zHI.Vv8qki6lKdO_S1OIT.zu0giea r_pOOjkfC2e44lrMUnoEA88hriH.RAYafWHp2Ea05zWvGt9DsKc88ebb3GZg DdPftV1LxSFTMvU5HTyWrLCkeojyM1kmzJb1HxZq6y_cz_JPHtK.FPzztXvZ draW0.J.Dg1sFFS1x2Ywzg6STi3GvjiDHeDHANQK5SHernULyT7_50yjIW_u tsvunP0B1wNApkwGPNfPAe8NbOWnwwlJfsisCuDXnvn2NGO9BP0K2hlXMbyt Wo270nDSxhoZ64YysZWgBkSefCRjzv4LBMyFXzv2M2M5849ho6_IAkzBCNy0 3t1DMGFy8MFVged3N3SgYxjOvTor7y_yB1xzmQhbvl.iQtb6VCz4Pqc78VtA TjcDY.56uWhDdwwpjtmUcQsX6_q7hHQwiIZ7nBJ5HddPpmJG4TBwkl3JX.0F dLlf89KYgDoBERQ-- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: From: Oliver Kiddle References: <141119085006.ZM18951@torch.brasslantern.com> <11014.1416438322@quattro> <141119222019.ZM2717@torch.brasslantern.com> <5A1A98B7-42E0-4EE1-9468-32E2D6434246@kba.biglobe.ne.jp> <141120091803.ZM3693@torch.brasslantern.com> <900E2DDB-B03E-4E1F-9F22-869D5A645E52@kba.biglobe.ne.jp> To: "zsh-workers@zsh.org" Subject: Re: Confirming X02zlevi test failures MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30161.1417013478.1@thecus.kiddle.eu> Date: Wed, 26 Nov 2014 15:51:19 +0100 Message-ID: <30162.1417013479@thecus.kiddle.eu> "Jun T." wrote: > commit c4110f7f4eac347fdbce71c286659a77beb138f7 added a workaround > to Test/comptest, but for the test to succeed on my Mac the line > zpty_flush After zletest > must also be commented out. > But even this is not enough, as reported below: Sorry, I interpreted 33765 (and my own test results) to indicate that this was fairly reliable. And I wasn't making much progress on a non-workaround fix myself. I'm fairly stuck as far as this issue goes. The test input is clearly being handled with the default (shttyinfo and ICANON) terminal settings in force but the terminal settings seem to get set and unset all over the place. The delayzsetterm stuff is not related. Digging through the history shows that the "some systems" on which the workaround was needed are DG/UX and Ultrix. Any objections to just ripping this out as per the patch below? Oliver diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index a38f55b..caa052b 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -187,10 +187,6 @@ mod_export char *zlenoargs[1] = { NULL }; static char **raw_lp, **raw_rp; -#ifdef FIONREAD -static int delayzsetterm; -#endif - /* * File descriptors we are watching as well as the terminal fd. * These are all for reading; we don't watch for writes or exceptions. @@ -210,9 +206,6 @@ mod_export void zsetterm(void) { struct ttyinfo ti; -#if defined(FIONREAD) - int val; -#endif if (fetchttyinfo) { /* @@ -224,30 +217,6 @@ zsetterm(void) fetchttyinfo = 0; } -#if defined(FIONREAD) - ioctl(SHTTY, FIONREAD, (char *)&val); - if (val) { - /* - * Problems can occur on some systems when switching from - * canonical to non-canonical input. The former is usually - * set while running programmes, but the latter is necessary - * for zle. If there is input in canonical mode, then we - * need to read it without setting up the terminal. Furthermore, - * while that input gets processed there may be more input - * being typed (i.e. further typeahead). This means that - * we can't set up the terminal for zle *at all* until - * we are sure there is no more typeahead to come. So - * if there is typeahead, we set the flag delayzsetterm. - * Then getbyte() calls here to performs another FIONREAD call; - * if that is 0, we have finally used up all the typeahead, and - * it is safe to alter the terminal, which we do at that point. - */ - delayzsetterm = 1; - return; - } else - delayzsetterm = 0; -#endif - /* sanitize the tty */ #ifdef HAS_TIO shttyinfo.tio.c_lflag |= ICANON | ECHO; @@ -343,7 +312,7 @@ zsetterm(void) ti.ltchars.t_dsuspc = ti.ltchars.t_lnextc = -1; #endif -#if defined(TTY_NEEDS_DRAINING) && defined(TIOCOUTQ) && defined(HAVE_SELECT) +#if defined(TIOCOUTQ) && defined(HAVE_SELECT) if (baud) { /**/ int n = 0; @@ -541,11 +510,7 @@ raw_getbyte(long do_keytmout, char *cptr) * timeouts may be external, so we may have both a permanent watched * fd and a long-term timeout. */ - if ((nwatch || tmout.tp != ZTM_NONE) -#ifdef FIONREAD - && ! delayzsetterm -#endif - ) { + if ((nwatch || tmout.tp != ZTM_NONE)) { #if defined(HAVE_SELECT) || defined(HAVE_POLL) int i, errtry = 0, selret; # ifdef HAVE_POLL @@ -883,10 +848,6 @@ getbyte(long do_keytmout, int *timeout) if (kungetct) ret = STOUC(kungetbuf[--kungetct]); else { -#ifdef FIONREAD - if (delayzsetterm) - zsetterm(); -#endif for (;;) { int q = queue_signal_level(); dont_queue_signals();