From: simon Date: Sun, 13 Oct 2002 23:57:40 +0000 (+0000) Subject: Don't forget to set $TERM when we spawn the pty. Of course I haven't X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/fe9548aa24943ff7e775a5c1273d42d2b9280bb9?hp=dd72dfa3f35403d197c07e9824946de2ea4b6df4 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! :-) git-svn-id: svn://svn.tartarus.org/sgt/putty@2039 cda61777-01e9-0310-a592-d414129be87e --- 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