[lkml]   [2009]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: [PATCH] kdesu broken
    I'd favour we go with this which passes t1, expect, emacs and a corrected

    (test t3 is buggy as it has no \n and leaves the tty in line by line mode
    so its typing a long line at the pty but never hits return to finish the

    It's theoretically imperfect in the case where you write a vast amount of
    output in one go, the tty is blocked the other end and then you close.
    However in practice that doesn't happen because with tty->low_latency = 1
    we run the pty received n_tty ldisc code in our context so each write
    fires through the entire n_tty ldisc and does flow control synchronously.

    It needs re-addressing but its simple which at this point wins over
    everything else and its one people tested before we tried to fix the hard
    corner cases

    commit aaf9da79c95a32fc5286fb851632baf09dc6134b
    Author: Alan Cox <>
    Date: Mon Jul 27 22:17:51 2009 +0100

    pty: quickfix for the pty ENXIO timing problems

    This also makes close stall in the normal case which is apparently needed
    to fix emacs

    Signed-off-by: Alan Cox <>

    diff --git a/drivers/char/pty.c b/drivers/char/pty.c
    index 6e6942c..3850a68 100644
    --- a/drivers/char/pty.c
    +++ b/drivers/char/pty.c
    @@ -52,6 +52,7 @@ static void pty_close(struct tty_struct *tty, struct file *filp)
    tty->link->packet = 0;
    set_bit(TTY_OTHER_CLOSED, &tty->link->flags);
    + tty_flip_buffer_push(tty->link);
    if (tty->driver->subtype == PTY_TYPE_MASTER) {
    @@ -207,6 +208,7 @@ static int pty_open(struct tty_struct *tty, struct file *filp)
    clear_bit(TTY_OTHER_CLOSED, &tty->link->flags);
    set_bit(TTY_THROTTLED, &tty->flags);
    retval = 0;
    + tty->low_latency = 1;
    return retval;

     \ /
      Last update: 2009-07-27 23:43    [W:0.022 / U:17.944 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site