Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37601352
en ru br
ALT Linux repos
S:1.0.8-alt3

Group :: Terminals
RPM: ttyrec

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 09_sigwinch.diff
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;
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin