From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1851 invoked from network); 10 Apr 2005 04:23:39 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 10 Apr 2005 04:23:39 -0000 Received: (qmail 87389 invoked from network); 10 Apr 2005 04:23:33 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Apr 2005 04:23:33 -0000 Received: (qmail 10121 invoked by alias); 10 Apr 2005 04:23:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21130 Received: (qmail 10107 invoked from network); 10 Apr 2005 04:23:30 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 10 Apr 2005 04:23:30 -0000 Received: (qmail 87096 invoked from network); 10 Apr 2005 04:23:30 -0000 Received: from rwcrmhc13.comcast.net (204.127.198.39) by a.mx.sunsite.dk with SMTP; 10 Apr 2005 04:23:25 -0000 Received: from madstop.pimlott.net ([24.4.236.18]) by comcast.net (rwcrmhc13) with ESMTP id <2005041004232201500qjr98e>; Sun, 10 Apr 2005 04:23:23 +0000 Received: from andrew by madstop.pimlott.net with local (Exim 3.35 #1 (Debian)) id 1DKTyk-0005Cb-00; Sat, 09 Apr 2005 21:23:22 -0700 Date: Sat, 9 Apr 2005 21:23:22 -0700 From: Andrew Pimlott To: Bart Schaefer Cc: 303623-quiet@bugs.debian.org, zsh-workers@sunsite.dk Subject: Re: Bug#303623: [andrew@pimlott.net: Bug#303623: zsh: CHECK_JOBS doesn't work when only one command was run since last Control-D] Message-ID: <20050410042322.GS12293@pimlott.net> References: <20050407191059.GA11437@scowler.net> <1050408000543.ZM18067@candle.brasslantern.com> <20050409234700.GP12293@pimlott.net> <1050410014930.ZM20382@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1050410014930.ZM20382@candle.brasslantern.com> User-Agent: Mutt/1.5.6+20040907i X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Sun, Apr 10, 2005 at 01:49:30AM +0000, Bart Schaefer wrote: > On Apr 9, 4:47pm, Andrew Pimlott wrote: > } Subject: Re: Bug#303623: [andrew@pimlott.net: Bug#303623: zsh: CHECK_JOBS > } > } > The issue here seems to be that zsh doesn't actually receive a ctrl-D > } > keystroke, but rather that there is a true end-of-file on the tty. > } > } Ok, but I don't think this should preclude correct behavior. My > } understanding is that when is pressed, the application gets a > } zero-length read on the terminal > > If the TTY driver is interpreting the EOF character, then yes, that is > what happens. However, zsh supposedly doesn't allow the TTY driver to > interpret ; it puts the terminal in CBREAK mode, so it receives a > literal ASCII '\04' character, so that it's able to invoke the bindkey > for that, which normally runs delete-char-or-list. > > The do-not-exit-when-jobs-are-pending behavior relies on having read a > '\04' when the input buffer is empty. It's a simulated end-of-file > rather than a real one. > > What *appears* to be happening -- I could still be wrong -- is that on > the second C-d the CBREAK setting fails to work as expected and zsh in > fact gets a zero-length read. Ah, I see, thanks. However, a strace doesn't seem to show that happening in this case. Here are the reads on FD 10 while reproducing the problem: read(10, "\4", 1) = 1 read(10, "t", 1) = 1 read(10, "r", 1) = 1 read(10, "u", 1) = 1 read(10, "e", 1) = 1 read(10, "\n", 1) = 1 read(10, "\4", 1) = 1 Andrew