aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar Kalle Samuels <github@charles.derkarl.org>2021-10-28 12:38:04 -0700
committerGravatar GitHub <noreply@github.com>2021-10-28 12:38:04 -0700
commit9cf1a9c8ee438964649e20292c139d6b3feb6c27 (patch)
treee396f8939abfde4f6cd9df10a846f7e1264a1f69 /scripts
parente023e81c08897c95271b4f4f0726ec165bb6e1bd (diff)
Don't sometimes hang just after launching ssh
sshd has a bug in which the sometimes it may get stuck trying to read from the client even though the child process has already exited. This is visible at https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/serverloop.c?annotate=1.226 line 274: once the child is waited on, `child_terminated` is reset to 0, which causes it to use an infinite timeout in the select there. This workaround causes mosh to disconnect from the server, thereby allowing sshd finish.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mosh.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mosh.pl b/scripts/mosh.pl
index 56e96d7..f224ef3 100755
--- a/scripts/mosh.pl
+++ b/scripts/mosh.pl
@@ -439,8 +439,8 @@ if ( $pid == 0 ) { # child
print "$_\n";
}
}
- waitpid $pid, 0;
close $pipe;
+ waitpid $pid, 0;
if ( not defined $ip ) {
if ( defined $sship ) {