Skip to content

Commit

Permalink
pty: quickfix for the pty ENXIO timing problems
Browse files Browse the repository at this point in the history
This also makes close stall in the normal case which is apparently
needed to fix emacs

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jul 27, 2009
1 parent f146214 commit 3a54297
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/char/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ static void pty_close(struct tty_struct *tty, struct file *filp)
return;
tty->link->packet = 0;
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->write_wait);
if (tty->driver->subtype == PTY_TYPE_MASTER) {
Expand Down Expand Up @@ -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;
out:
return retval;
}
Expand Down

0 comments on commit 3a54297

Please sign in to comment.