Re: Ctrl+C doesn't interrupt process waiting for I/O

From: David Newall
Date: Tue Jul 01 2008 - 05:13:19 EST


Török Edwin wrote:
> David Newall wrote:
>
>> Elias Oltmanns wrote:
>>
>>
>>> - if (!L_NOFLSH(tty)) {
>>> - n_tty_flush_buffer(tty);
>>> - tty_driver_flush_buffer(tty);
>>> - }
>>> if (L_ECHO(tty))
>>> echo_char(c, tty);
>>> - if (tty->pgrp)
>>> - kill_pgrp(tty->pgrp, signal, 1);
>>> + isig(signal, tty, 0);
>>>
>>>
>> My first reaction is that tty->pgrp must be null. Perhaps the patch
>> could be simplified...
>>
>> if (tty->pgrp)
>> kill_pgrp(tty->pgrp, signal, 1);
>> + else
>> + isig(signal, tty, 0);
>>
>>
>> Thoughts?
>>
>>
>
> isig has the same check, if it is NULL, isig won't deliver the signal
> either
>

That is odd. We did see the control-key echoed, so, other than not
flushing output, what's funcitonally different?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/