lkml.org 
[lkml]   [2008]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Visible Ctrl-C in latest kernels
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


\
 
 \ /
  Last update: 2008-08-25 16:33    [W:0.030 / U:0.608 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site