Skip to content

Commit 42e0893

Browse files
committed
Unset stale SSH_TTY environment variable
This variable would confuse devices that relied on it, such as the Clipetty extension for Emacs. See issue mobile-shell#1134
1 parent dbe419d commit 42e0893

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/frontend/mosh-server.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,12 @@ static int run_server( const char *desired_ip, const char *desired_port,
570570
exit( 1 );
571571
}
572572

573+
/* clear stale SSH_TTY environment variable */
574+
if ( unsetenv( "SSH_TTY" ) < 0 ) {
575+
perror( "unsetenv" );
576+
exit( 1 );
577+
}
578+
573579
chdir_homedir();
574580

575581
if ( with_motd && (!motd_hushed()) ) {

0 commit comments

Comments
 (0)