zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Andrew Pimlott <andrew@pimlott.net>, 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: Sun, 10 Apr 2005 01:49:30 +0000	[thread overview]
Message-ID: <1050410014930.ZM20382@candle.brasslantern.com> (raw)
In-Reply-To: <20050409234700.GP12293@pimlott.net>

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 <C-D> 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 <C-d>; 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.


  reply	other threads:[~2005-04-10  1:49 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   ` Bug#303623: " Andrew Pimlott
2005-04-10  1:49     ` Bart Schaefer [this message]
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=1050410014930.ZM20382@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=303623-quiet@bugs.debian.org \
    --cc=andrew@pimlott.net \
    --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).