From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14332 invoked by alias); 25 Nov 2014 17:13:16 -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: 33796 Received: (qmail 4225 invoked from network); 25 Nov 2014 17:13:14 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-Biglobe-Sender: Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Confirming X02zlevi test failures From: "Jun T." In-Reply-To: <141120091803.ZM3693@torch.brasslantern.com> Date: Wed, 26 Nov 2014 02:13:08 +0900 Content-Transfer-Encoding: 7bit Message-Id: 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> To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.1878.6) X-Biglobe-Spnum: 55290 2014/11/21 02:18, Bart Schaefer wrote: > Clearly the slave can "see" it's own > output if the master doesn't manage to grab it first. I also added some dputs() to zle_main.c as in the patch below, but I could not reproduce your observation; it seems (at least on my Mac) the slave zsh sees only what the master has written. But the test fails nonetheless. Typical dputs() output during testing 'swap case on a blank line' is like the following (on Mac, select() is used in place of poll()): T 1 1 1 0 S 0 10000 select() timeouts T 0 0 0 0 R <^[> T 1 1 1 0 S 1 10000 does NOT timeout R <~> T 0 0 0 1 delayzsetterm=1 R T 0 0 0 1 R T 0 0 0 1 R <^[> T 1 1 1 1 R <~> select() not called since delayzsetterm=1 For the 1st tilde, select() is called with the correct timeout, but it returns 1 (i.e., 1 descriptor is ready for read) rather than timeouts. This may be due to that some data has been received by the slave tty while it is in the canonical mode...? The reason that delayzsetterm becomes 1 may be that bash_complete-word calls zrefresh(). I guess this problem will go away if the 1st ESC-tilde is correctly handeld. But once delayzsetterm becomes 1, it is not reset to 0 until zsetterm() is called again. diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index d157e36..31b577d 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -531,6 +531,8 @@ raw_getbyte(long do_keytmout, char *cptr) #endif calc_timeout(&tmout, do_keytmout); + dputs("T %d %d %d %d", do_keytmout, tmout.tp, + tmout.tp ? tmout.exp100ths : 0, delayzsetterm); /* * Handle timeouts and watched fd's. If a watched fd or a function @@ -635,6 +637,7 @@ raw_getbyte(long do_keytmout, char *cptr) selret = select(fdmax+1, (SELECT_ARG_2_T) & foofd, NULL, NULL, tvptr); winch_block(); + dputs("S %d %d",selret,tvptr->tv_usec); # endif /* * Make sure a user interrupt gets passed on straight away. @@ -853,6 +856,7 @@ raw_getbyte(long do_keytmout, char *cptr) winch_unblock(); ret = read(SHTTY, cptr, 1); winch_block(); + dputs("R <%c>\n",*cptr); return ret; }