From: Andrew Pimlott <andrew@pimlott.net>
To: Bart Schaefer <schaefer@brasslantern.com>
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]
Date: Sat, 9 Apr 2005 21:23:22 -0700 [thread overview]
Message-ID: <20050410042322.GS12293@pimlott.net> (raw)
In-Reply-To: <1050410014930.ZM20382@candle.brasslantern.com>
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 <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.
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
prev parent reply other threads:[~2005-04-10 4:23 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
2005-04-10 4:23 ` Andrew Pimlott [this message]
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=20050410042322.GS12293@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).