A character cell can only be either narrow or wide. It's more
convenient to represent that as an int containing 1 or 2, but slightly
more correct to represent it as a "boolean" single-bit integer.
The terminal framebuffer was not resetting the wrap state of a row
when a previously-wrapping line was overwritten by a non-wrapping
line. Restore previous, subtle behavior of line wrap. Fix wrap
verification bug now exposed by emulation-wrap-across-frames.test.
Also hoist some getters, mostly for clarity.
Fixes#820.
None of the previous tests even ran the mosh script unless tmux ≥ 1.8 is
installed. Thus ‘make check’ was “passing” on, e.g., RHEL 6 even though
its Perl is too old (5.10.1).
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This builds an OS X package and deploys it to a GitHub release when a
tag is pushed. It also generates a tarball reporting the build
environment and configuration. The build log is still separate.
This is not yet final, it deploys to cgull/mosh and not
mobile-shell/mosh.
It should not affect Linux or OS X CI builds (other than the change to
the Travis Xcode 7.1 image).
Included changes:
The Travis Xcode 7 image seems to have added tmux while we were gone,
breaking our Homebrew setup.
There seems to be no clean reliable way to determine whether a
Homebrew package is installed or needs updating. Reinstalling is less
efficient but seems to work reliably.
The OS X build is now split between four files:
.travis.yml contains Travis-specific CI/release build configuration.
macosx/brew.sh contains Homebrew-specific package manager installs and
reporting.
macosx/osx-xcode.sh contains Apple-specific OS/X and Xcode reporting.
macosx/build.sh does the actual package build.
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>
The root problem here is that writes to the frame buffer may alter it,
but leave it with the same contents as before, and the diff between
the two states is the empty string. With the dirty-rows,
smart-pointer changes to Framebuffer, it is easy to run into this
situation. This got Network::TransportSender confused about timeouts,
and mosh-server would spin.
The theoretically correct fix would be to have operator==() exactly
correspond to diff(otherstate).empty(). I have partly implemented
this (and may yet finish) but it's not trivial to get right.
This is a much simpler fix that simply attempts to correctly update
timers when two framebuffers are different and an empty diff is
generated.
Some systems do not deliver SIGPIPE to shell pipeline writers when the
downstream reader has exited. So, also check for errors from
/bin/printf. I fixed this for OpenBSD 6.0 but I think it will also
fix posh on Linux.
Replace some blind timeouts with actual synchronization.
Improve performance on some slow tests.
Tweak some of the remaining timeouts.
This still isn't good enough to get 'make -j9 check'
working reliably on Cygwin for me; I think some Cygwin/
Windows scheduling issues remain.
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.
Also cleans up other setsockopt() calls, and buffer sizing/handling
for recvmsg().
These are minor errors and no actual misbehavior was observed.
Discovered while working Windows Subsystem for Linux compatibility
issues.