mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 09:42:25 +00:00
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]
This commit is contained in:
parent
e6d2d5260f
commit
598018644a
@ -92,6 +92,11 @@ static char *pty_init(char *host, int port, char **realhost, int nodelay)
|
|||||||
/* Close everything _else_, for tidiness. */
|
/* Close everything _else_, for tidiness. */
|
||||||
for (i = 3; i < 1024; i++)
|
for (i = 3; i < 1024; i++)
|
||||||
close(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)
|
if (pty_argv)
|
||||||
execvp(pty_argv[0], pty_argv);
|
execvp(pty_argv[0], pty_argv);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user