From 18dc967c096b83114fa70ba986abc402eff5a1f2 Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Mon, 16 Apr 2012 07:27:24 -0400 Subject: [PATCH] Small fixups to pty reversal to make work on Linux. --- scripts/mosh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/mosh b/scripts/mosh index faa3176..fd910eb 100755 --- a/scripts/mosh +++ b/scripts/mosh @@ -193,9 +193,9 @@ my $pid = fork; die "$0: fork: $!\n" unless ( defined $pid ); if ( $pid == 0 ) { # child $pty->close_slave(); + $pty->set_raw(); open STDOUT, ">&", $pty or die; open STDERR, ">&", $pty or die; - close $pty; my @server = ( 'new', '-s' ); @@ -218,6 +218,7 @@ if ( $pid == 0 ) { # child die "Cannot exec ssh: $!\n"; } else { # server my ( $ip, $port, $key ); + close $pty; LINE: while ( <$pty_slave> ) { chomp; if ( m{^MOSH IP } ) {