Messages in this thread | | | Date | Tue, 5 Aug 2008 00:11:29 +0100 | From | Alan Cox <> | Subject | Re: tty: ctrl-c not always echoed, especially under load |
| |
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
| |