From 2ef025c09a32f11e2b55f39426dedb78e0bf99dd Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Tue, 8 Jan 2013 18:08:13 +0100 Subject: [PATCH] Dup to pty to prevent ssh from reading our stdin Dup the pty to STDIN to prevent hour the exec'ed ssh from consuming our early input. Due to the fact that mosh-server copies the pty settings from the pty it as when starting, we can't set that one to a raw. This are probably a combination of effects cased by fcc629ac and 18dc967c. This probably fixes #366 [Closes #369] --- scripts/mosh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mosh b/scripts/mosh index d5ce42c..26845e7 100755 --- a/scripts/mosh +++ b/scripts/mosh @@ -222,9 +222,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; + open STDIN, "<&", $pty or die; my @server = ( 'new', '-s' );