[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
TIOCSWINSZ fix
tty.c: ++entropy@terminator.rs.itd.umich.edu
When the window size for a tty, has changed, send SIGWINCH to the
foreground process group of the tty.
--- 1.10.1.4 1994/02/27 04:04:56
+++ tty.c 1994/03/19 12:47:20
@@ -528,7 +528,15 @@
return 0;
case TIOCSWINSZ:
sz = (struct winsize *)arg;
+ if (sz->ws_row != tty->wsiz.ws_row
+ || sz->ws_col != tty->wsiz.ws_col
+ || sz->ws_xpixel != tty->wsiz.ws_xpixel
+ || sz->ws_ypixel != tty->wsiz.ws_ypixel)
+ i = 1;
+ else
+ i = 0;
tty->wsiz = *sz;
+ if (i) killgroup(tty->pgrp, SIGWINCH);
return 0;
case TIOCGPGRP:
*((long *)arg) = tty->pgrp;
--
entropy -- it's not just a good idea, it's the second law.
Personal mail: entropy@gnu.ai.mit.edu
MiNT library mail: entropy@terminator.rs.itd.umich.edu
"what do you have against octal?" -jrb