Skip to content

Instantly share code, notes, and snippets.

@kanru
Created September 14, 2008 14:17
Show Gist options
  • Save kanru/10730 to your computer and use it in GitHub Desktop.
Save kanru/10730 to your computer and use it in GitHub Desktop.
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index daeb8f7..48e67b3 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2523,6 +2523,9 @@ int tty_do_resize(struct tty_struct *tty, struct tty_struct *real_tty,
rpgrp = get_pid(real_tty->pgrp);
spin_unlock_irqrestore(&tty->ctrl_lock, flags);
+ tty->winsize = *ws;
+ real_tty->winsize = *ws;
+
if (pgrp)
kill_pgrp(pgrp, SIGWINCH, 1);
if (rpgrp != pgrp && rpgrp)
@@ -2530,9 +2533,6 @@ int tty_do_resize(struct tty_struct *tty, struct tty_struct *real_tty,
put_pid(pgrp);
put_pid(rpgrp);
-
- tty->winsize = *ws;
- real_tty->winsize = *ws;
done:
mutex_unlock(&real_tty->termios_mutex);
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment