From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14969 invoked from network); 10 Apr 2005 01:49:54 -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 01:49:54 -0000 Received: (qmail 40355 invoked from network); 10 Apr 2005 01:49:46 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Apr 2005 01:49:46 -0000 Received: (qmail 10118 invoked by alias); 10 Apr 2005 01:49:40 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21129 Received: (qmail 10103 invoked from network); 10 Apr 2005 01:49:38 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 10 Apr 2005 01:49:38 -0000 Received: (qmail 40114 invoked from network); 10 Apr 2005 01:49:38 -0000 Received: from vms046pub.verizon.net (206.46.252.46) by a.mx.sunsite.dk with SMTP; 10 Apr 2005 01:49:33 -0000 Received: from candle.brasslantern.com ([4.11.1.68]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IEP009ODJQJBYU3@vms046.mailsrvcs.net> for zsh-workers@sunsite.dk; Sat, 09 Apr 2005 20:49:32 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j3A1nV42020384; Sat, 09 Apr 2005 18:49:31 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j3A1nUos020383; Sat, 09 Apr 2005 18:49:30 -0700 Date: Sun, 10 Apr 2005 01:49:30 +0000 From: Bart Schaefer 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] In-reply-to: <20050409234700.GP12293@pimlott.net> To: Andrew Pimlott , 303623-quiet@bugs.debian.org Cc: zsh-workers@sunsite.dk Message-id: <1050410014930.ZM20382@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <20050407191059.GA11437@scowler.net> <1050408000543.ZM18067@candle.brasslantern.com> <20050409234700.GP12293@pimlott.net> Comments: In reply to Andrew Pimlott "Re: Bug#303623: [andrew@pimlott.net: Bug#303623: zsh: CHECK_JOBS doesn't work when only one command was run since last Control-D]" (Apr 9, 4:47pm) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-1.7 required=6.0 tests=ADDRESS_IN_SUBJECT,AWL, BAYES_00 autolearn=no version=3.0.2 X-Spam-Hits: -1.7 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. When ignoreeof is not set, this causes the shell to exit. The point being that although I agree this is not the correct behavior, the reason for the failure is not what you may think, and therefore the fix is likely to be in a more obscure part of the C code. Further, the workaround in the meantime is to setopt ignoreeof.