lkml.org 
[lkml]   [2008]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Ctrl+C doesn't interrupt process waiting for I/O
Elias Oltmanns wrote:
> Due to my tests, 2.6.24 responds much faster to Ctrl+C than 2.6.25 does.
> The patch above makes them *feel* alike again (no hard numbers, mind).
> However, I haven't checked anything as early as 2.6.21 or before so I
> don't know whether there may have been another regression since then.

OK, thanks for checking. Can you try the patch below? It is almost the
same as your patch, except it reverses the order of the isig and the echo.

This causes ^C echo to work for me in both console and xterm. Back when
I did the original patch, I was concerned this ordering could result in
the ^C echoing late, but this may not be an issue.

Let me know if the patch below fixes the issue with interrupting
processes waiting for I/O.

Thanks, Joe
--- linux/drivers/char/n_tty.c.orig 2008-07-01 10:48:05.000000000 -0500
+++ linux/drivers/char/n_tty.c 2008-07-01 11:20:07.000000000 -0500
@@ -759,20 +759,9 @@
signal = SIGTSTP;
if (c == SUSP_CHAR(tty)) {
send_signal:
- /*
- * Echo character, and then send the signal.
- * Note that we do not use isig() here because we want
- * the order to be:
- * 1) flush, 2) echo, 3) signal
- */
- if (!L_NOFLSH(tty)) {
- n_tty_flush_buffer(tty);
- tty_driver_flush_buffer(tty);
- }
+ isig(signal, tty, 0);
if (L_ECHO(tty))
echo_char(c, tty);
- if (tty->pgrp)
- kill_pgrp(tty->pgrp, signal, 1);
return;
}
}
\
 
 \ /
  Last update: 2008-07-01 18:31    [W:0.099 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site