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.
This may be useful for users who find prediction's activity right of
the cursor distracting.
Prediction underscoring is still a little weird sometimes, it replays
a history of known/unknown changes as acks come in from the server.
This is as variant of the patch I had in EL5 for a while, but forgot to upstream.
It turns out that the changes we made to support 5.10.1 are actually sufficient
for 5.8.8 if we remove unused imports, so remove them.
This reverts commit f002e3bb30.
That commit appears to have created a race between ssh restoring
termios state and mosh-client initializing termios.
Probably fixes#844.
I was recommended to use mosh as "an in-place replacement for ssh" by
my friends, and take a while to figure out the message until I
realized I missed the line "The Mosh package should be installed on
both the client and server."
If this line often corresponds to missing server-side installation,
rather than other mysterious scenario, how about adding a hint?
These should output to stdout and exit with status 0. Passing
std-options to AM_INIT_AUTOMAKE causes ‘make installcheck’ (hence also
‘make distcheck’) to verify this.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
On Perl < 5.14, we can use Socket::GetAddrInfo from CPAN to replace the
missing getaddrinfo functionality of Socket.
Socket::GetAddrInfo < 0.22 requires :newapi in the import list, but 0.22
forbids it and enables the new API by default.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This eliminates issues with typeahead being echoed by the remote pty
and corrupting remote output from mosh-server to the mosh script, but
cannot be made default because older mosh-servers require a pty.
OS X advertises IPv6 link-local addresses for .local hostnames.
getaddrinfo() correctly reports interface identifiers for these, but we
were discarding them by using the socket peer host address instead.
For example, do not interpret regex metacharacters within the
hostname, and avoid accidentally matching the username part of
username@hostname when they happen to match.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Improves 679b819216 to make it simpler to
ignore mosh-client from OS X Terminal.app's "Ask before closing" process
list. (See: http://superuser.com/a/254647)
Moreover, the command displayed from ps is a completely functional one,
which was not the case in the previous approach, that mangles `argv[0]`.
Fixes#742.