From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29031 invoked from network); 8 Apr 2005 00:06:02 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Apr 2005 00:06:02 -0000 Received: (qmail 19105 invoked from network); 8 Apr 2005 00:05:56 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Apr 2005 00:05:56 -0000 Received: (qmail 9515 invoked by alias); 8 Apr 2005 00:05:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21116 Received: (qmail 9501 invoked from network); 8 Apr 2005 00:05:53 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Apr 2005 00:05:52 -0000 Received: (qmail 18946 invoked from network); 8 Apr 2005 00:05:52 -0000 Received: from vms044pub.verizon.net (206.46.252.44) by a.mx.sunsite.dk with SMTP; 8 Apr 2005 00:05:48 -0000 Received: from candle.brasslantern.com ([4.11.1.68]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IEL007CMPLK894C@vms044.mailsrvcs.net> for zsh-workers@sunsite.dk; Thu, 07 Apr 2005 19:05:45 -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 j3805hsn018069; Thu, 07 Apr 2005 17:05:43 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j3805h6j018068; Thu, 07 Apr 2005 17:05:43 -0700 Date: Fri, 08 Apr 2005 00:05:42 +0000 From: Bart Schaefer Subject: Re: [andrew@pimlott.net: Bug#303623: zsh: CHECK_JOBS doesn't work when only one command was run since last Control-D] In-reply-to: <20050407191059.GA11437@scowler.net> To: zsh-workers@sunsite.dk, 303623-submitter@bugs.debian.org Message-id: <1050408000543.ZM18067@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> Comments: In reply to Clint Adams "[andrew@pimlott.net: Bug#303623: zsh: CHECK_JOBS doesn't work when only one command was run since last Control-D]" (Apr 7, 3:10pm) 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=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Apr 7, 3:10pm, Clint Adams wrote: } } When a job is still running and the CHECK_JOBS is set, zsh should only } exit when it receives two exit requests in a row. However, sometimes it } honors an exit request in other conditions. One repeatable case is when } the request is a Control-D and there was only one command run since the } last exit request. 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. If you try, for example, running zsh and then starting another zsh from within the first, then when you force the "inner" zsh to exit, the "outer" one sometimes exits as well. There may actually be some kind of race condition here, because sometimes only the "inner" shell exits. It might even be an xterm bug. Here's a much simpler example to reproduce the base problem: zsh -f % sleep 300 & % zsh: you have running jobs. % true % zsh: warning: 1 jobs SIGHUPed It only happens with , not with the 'exit' builtin, so it may have to do with an interaction with no_ignore_eof.