public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Peterson <joe@skyrush.com>
To: Willy Tarreau <w@1wt.eu>
Cc: Chris Frey <cdfrey@foursquare.net>,
	Vegard Nossum <vegard.nossum@gmail.com>,
	linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: Visible Ctrl-C in latest kernels
Date: Mon, 25 Aug 2008 08:29:46 -0600	[thread overview]
Message-ID: <48B2C1DA.6070700@skyrush.com> (raw)
In-Reply-To: <20080825141354.GB19337@1wt.eu>

Willy Tarreau wrote:
> not mine, I was speaking about your patch of 2008/02/06 which was
> talked about earlier in this thread. I was thinking that it was
> possible that the signal got delayed when it was hard to print
> ^C because the output was already busy spewing a stream of data.
> Maybe I'm wrong, but I mean it does not cost much to try to revert
> this patch when the problem is encountered. And I keep in mind
> that it is possible, as you say, that your patch only makes the
> problem more visible.

Actually, funny you mention the case when output is busy.  This actually
will not cause any delay of the signal, but it instead causes the echo
(not the signal) to be thrown away in the current code.  If the tty
driver's buffer is full, the attempted write simply returns - nothing is
held.  The signal is still sent right away.

Now, this loss of the echo is a problem in itself, not because it delays
the signals, but because the echo will not be displayed.  Echo is also
lost when the tty is stopped (but the signal chars restart the tty, so
you will only see this for regular chars typed after, say, a ctrl-s)).

I have another patch out that will fix the lost echo issue:

	http://marc.info/?l=linux-kernel&m=121924672730143&w=2

Note that this patch also will never cause any delay of the signals.  In
fact, it places the echo character in a buffer so that a full or stopped
tty buffer will not cause the echoed char to be immediately discarded.
The signal, same as now, is always immediately issued - no delay.

					-Joe

  reply	other threads:[~2008-08-25 14:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-22 20:15 Visible Ctrl-C in latest kernels Chris Frey
2008-08-23  9:53 ` Vegard Nossum
2008-08-23 17:52   ` Joe Peterson
2008-08-24  1:02     ` Chris Frey
2008-08-25 12:20       ` Willy Tarreau
2008-08-25 14:00         ` Joe Peterson
2008-08-25 14:13           ` Willy Tarreau
2008-08-25 14:29             ` Joe Peterson [this message]
2008-08-25 17:37         ` David Newall
2008-08-25 18:03           ` Joe Peterson
2008-08-26  1:08             ` Joe Peterson
2008-08-26  7:40               ` David Newall

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=48B2C1DA.6070700@skyrush.com \
    --to=joe@skyrush.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=cdfrey@foursquare.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vegard.nossum@gmail.com \
    --cc=w@1wt.eu \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox