fix regression w.r.t. TTY and external programmes:

• release the TTY after the initial change_winsz()
• since we release it, we can skip initialising tty_state, too
This commit is contained in:
tg
2012-03-25 14:28:14 +00:00
parent 5dd5edea1a
commit 87654270ab
3 changed files with 7 additions and 6 deletions

5
main.c
View File

@ -34,7 +34,7 @@
#include <locale.h>
#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