Permalink
Browse files

Small fixups to pty reversal to make work on Linux.

  • Loading branch information...
1 parent fe8e50d commit 18dc967c096b83114fa70ba986abc402eff5a1f2 @keithw keithw committed Apr 16, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 scripts/mosh
View
@@ -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 } ) {

0 comments on commit 18dc967

Please sign in to comment.