From 87654270ab3e190a42b7cb5915f087b3397af01c Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 25 Mar 2012 14:28:14 +0000 Subject: [PATCH] =?UTF-8?q?fix=20regression=20w.r.t.=20TTY=20and=20externa?= =?UTF-8?q?l=20programmes:=20=E2=80=A2=20release=20the=20TTY=20after=20the?= =?UTF-8?q?=20initial=20change=5Fwinsz()=20=E2=80=A2=20since=20we=20releas?= =?UTF-8?q?e=20it,=20we=20can=20skip=20initialising=20tty=5Fstate,=20too?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check.t | 4 ++-- main.c | 5 +++-- sh.h | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/check.t b/check.t index 4b00f28..8954d3f 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.520 2012/03/24 21:22:23 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.521 2012/03/25 14:28:11 tg Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ @@ -29,7 +29,7 @@ # http://www.freebsd.org/cgi/cvsweb.cgi/src/tools/regression/bin/test/regress.sh?rev=HEAD expected-stdout: - @(#)MIRBSD KSH R40 2012/03/24 + @(#)MIRBSD KSH R40 2012/03/25 description: Check version of shell. stdin: diff --git a/main.c b/main.c index 8022782..0405b1b 100644 --- a/main.c +++ b/main.c @@ -34,7 +34,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/main.c,v 1.210 2012/03/24 22:11:41 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/main.c,v 1.211 2012/03/25 14:28:14 tg Exp $"); extern char **environ; @@ -252,8 +252,9 @@ main_init(int argc, const char *argv[], Source **sp, struct block **lp) #ifdef TIOCGWINSZ /* try to initialise tty size before importing environment */ - tty_init(true, false); + tty_init(false, false); change_winsz(); + tty_close(); #endif #ifdef _PATH_DEFPATH diff --git a/sh.h b/sh.h index 342e4ba..49cb30c 100644 --- a/sh.h +++ b/sh.h @@ -152,9 +152,9 @@ #endif #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.527 2012/03/24 21:22:25 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.528 2012/03/25 14:28:14 tg Exp $"); #endif -#define MKSH_VERSION "R40 2012/03/24" +#define MKSH_VERSION "R40 2012/03/25" /* arithmetic types: C implementation */ #if !HAVE_CAN_INTTYPES