mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Joe Peterson <joe@skyrush.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: tty: ctrl-c not always echoed, especially under load
Date: Tue, 5 Aug 2008 00:11:29 +0100	[thread overview]
Message-ID: <20080805001129.72d06e60@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <48977C96.2090005@skyrush.com>

On Mon, 04 Aug 2008 16:03:02 -0600
Joe Peterson <joe@skyrush.com> wrote:

> I am experiencing a rather intermittent and hard-to-reproduce issue in the tty
> layer, and I am posting here to get ideas on how to debug it from those of you
> who have delved into the tty internals.  I suspect some kind of race is going on
> or the echo is caught in the tty buffer when it gets flushed (and never makes it
> to the tty).  Heavy load (compiling, etc.) seems to make it more likely.
> 
> When a signal character (e.g. ctrl-c) is received, the tty ldisc and driver are
> flushed, the character is echoed (e.g. "^C" if echoctl is on), and the signal is
> issued.  Because the flush happens first, the echo should always appear on the
> tty, but sometimes it does not.  What I am wondering is how the echo could get
> "swallowed".  The code I have been using to test this is:

If the output buffer is full then echoed characters/^C etc will vanish the
way n_tty implements its buffering internally. It's always worked that
way.

Alan

  reply	other threads:[~2008-08-04 23:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04 22:03 Joe Peterson
2008-08-04 23:11 ` Alan Cox [this message]
2008-08-04 23:36   ` Joe Peterson
2008-08-06 20:17   ` Joe Peterson
2008-08-07 19:37     ` Alan Cox
2008-08-07 20:31       ` Joe Peterson
2008-08-11 15:14       ` Joe Peterson
2008-08-11 16:39         ` Alan Cox
2008-08-11 17:41           ` Joe Peterson
2008-08-14 16:19           ` [PATCH] " Joe Peterson

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=20080805001129.72d06e60@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=joe@skyrush.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®