Commit 3a542974 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

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: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f1462147
...@@ -52,6 +52,7 @@ static void pty_close(struct tty_struct *tty, struct file *filp) ...@@ -52,6 +52,7 @@ static void pty_close(struct tty_struct *tty, struct file *filp)
return; return;
tty->link->packet = 0; tty->link->packet = 0;
set_bit(TTY_OTHER_CLOSED, &tty->link->flags); set_bit(TTY_OTHER_CLOSED, &tty->link->flags);
tty_flip_buffer_push(tty->link);
wake_up_interruptible(&tty->link->read_wait); wake_up_interruptible(&tty->link->read_wait);
wake_up_interruptible(&tty->link->write_wait); wake_up_interruptible(&tty->link->write_wait);
if (tty->driver->subtype == PTY_TYPE_MASTER) { if (tty->driver->subtype == PTY_TYPE_MASTER) {
...@@ -207,6 +208,7 @@ static int pty_open(struct tty_struct *tty, struct file *filp) ...@@ -207,6 +208,7 @@ static int pty_open(struct tty_struct *tty, struct file *filp)
clear_bit(TTY_OTHER_CLOSED, &tty->link->flags); clear_bit(TTY_OTHER_CLOSED, &tty->link->flags);
set_bit(TTY_THROTTLED, &tty->flags); set_bit(TTY_THROTTLED, &tty->flags);
retval = 0; retval = 0;
tty->low_latency = 1;
out: out:
return retval; return retval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment