zsh-workers
 help / color / mirror / code / Atom feed
From: Andrew Pimlott <andrew@pimlott.net>
To: Bart Schaefer <schaefer@brasslantern.com>, 303623-quiet@bugs.debian.org
Cc: 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]
Date: Sat, 9 Apr 2005 16:47:00 -0700	[thread overview]
Message-ID: <20050409234700.GP12293@pimlott.net> (raw)
In-Reply-To: <1050408000543.ZM18067@candle.brasslantern.com>

On Fri, Apr 08, 2005 at 12:05:42AM +0000, Bart Schaefer wrote:
> 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.

Ok, but I don't think this should preclude correct behavior.  My
understanding is that when <C-D> is pressed, the application gets a
zero-length read on the terminal, but that a subsequent read will get
more keyboard input (or another zero-length read if <C-D> is pressed
again).  So zsh should still be able to detect each press of <C-D>
reliably.

> 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.

Hmm, mysterious.  I should have also said in my message that I think
I've seen unexpected exits in other cases, but the one I posted is the
only one I could reproduce.  It sounds like there is a subtle bug in
zsh.

> 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:

Right, I should have explained that I gave a longer example to show that
1) exit and <C-D> act differently and 2) running two commands between
<C-D>s behaves as expected.

Andrew


  reply	other threads:[~2005-04-09 23:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-07 19:10 Clint Adams
2005-04-08  0:05 ` Bart Schaefer
2005-04-09 23:47   ` Andrew Pimlott [this message]
2005-04-10  1:49     ` Bug#303623: " Bart Schaefer
2005-04-10  4:23       ` Andrew Pimlott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050409234700.GP12293@pimlott.net \
    --to=andrew@pimlott.net \
    --cc=303623-quiet@bugs.debian.org \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).