lkml.org 
[lkml]   [2008]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Ctrl+C doesn't interrupt process waiting for I/O
    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:

    if (tty->pgrp)
    kill_pgrp(tty->pgrp, sig, 1);

    --Edwin



    \
     
     \ /
      Last update: 2008-07-01 11:03    [W:4.245 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site