Group :: Terminais
RPM: ttyrec
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: 09_sigwinch.diff
Download
Download
Description: Handle SIGWINCH
Auther: Joey Hess <joeyh@debian.org>
Reported-By: Joey Hess <joeyh@debian.org>
Bug-Debian: http://bugs.debian.org/564777
Reviewed-By: NIIBE Yutaka <gniibe@fsij.org>
Last-Update: 2010-04-27
--- ttyrec-1.0.8.orig/ttyrec.c 2010-04-27 11:16:36.000000000 +0900
+++ ttyrec-1.0.8/ttyrec.c 2010-04-27 12:31:36.000000000 +0900
@@ -113,6 +113,13 @@
int aflg;
int uflg;
+static void
+resize(int dummy) {
+ /* transmit window change information to the child */
+ (void) ioctl(0, TIOCGWINSZ, (char *)&win);
+ (void) ioctl(master, TIOCSWINSZ, (char *)&win);
+}
+
int
main(argc, argv)
int argc;
@@ -178,6 +185,7 @@
else
doshell(command);
}
+ signal(SIGWINCH, resize);
doinput();
return 0;