From 598018644a0e0c8138fd780b355d35c42d765e52 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 13 Oct 2002 23:57:40 +0000 Subject: [PATCH] Don't forget to set $TERM when we spawn the pty. Of course I haven't noticed this until now because I've always been spawning it _from_ another xterm! :-) [originally from svn r2039] --- unix/pty.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/unix/pty.c b/unix/pty.c index 5d05e8f2..e5b6ad54 100644 --- a/unix/pty.c +++ b/unix/pty.c @@ -92,6 +92,11 @@ static char *pty_init(char *host, int port, char **realhost, int nodelay) /* Close everything _else_, for tidiness. */ for (i = 3; i < 1024; i++) close(i); + { + char term_env_var[10 + sizeof(cfg.termtype)]; + sprintf(term_env_var, "TERM=%s", cfg.termtype); + putenv(term_env_var); + } if (pty_argv) execvp(pty_argv[0], pty_argv); else