Commit Graph

194 Commits

Author SHA1 Message Date
Larry Doolittle eda48085ba Simple spelling fixes 2012-05-23 05:11:05 -04:00
Keegan McAllister dd941df19d Remove unused sigfd and skalibs
Closes #265.
2012-05-16 00:00:27 -04:00
Keegan McAllister 4f23326a92 Use Select signal handling in mosh-{client,server} 2012-05-16 00:00:27 -04:00
Keegan McAllister 6edc04ed1c mosh-server: Ignore signals rather than blocking them
For pselect() we want to mess with the signal mask, and this is closer to our
intent anyway.
2012-05-16 00:00:27 -04:00
Keegan McAllister 768d4ce797 Make Select a singleton
It's going to manipulate process-global signal state, so multiple
instances do not make sense.
2012-05-16 00:00:27 -04:00
Keegan McAllister bb651581a7 Remove unused poll(2) emulation
Closes #235.
2012-05-16 00:00:27 -04:00
Keegan McAllister 2112a3865c Use Select in mosh-{client,server} 2012-05-16 00:00:27 -04:00
Keegan McAllister 5bf681629d mosh-server: Treat errors on pty read like EOF
Fixes #264.
2012-05-16 00:00:27 -04:00
Keegan McAllister dee09fb8fc Update notification less often when disconnected for at least 60 s
Saves battery power.  Closes #243.
2012-05-09 14:19:46 -04:00
Keegan McAllister 24d2b6e185 Calculate wait_time separately for {Notification,Prediction}Engine
Simplifies access to private data, including the next commit.

git renders this diff poorly.  It's a bit better with --patience.
2012-05-09 14:19:46 -04:00
Keegan McAllister 02c04fbdaa Display sendto() exception until a successful send 2012-05-09 14:19:46 -04:00
Keegan McAllister 67a85eaf99 Deliver sendto() exceptions without disturbing control flow
This prevents the client from waking up every 200 ms while the network is down.
Addresses #243.
2012-05-09 14:19:46 -04:00
Keegan McAllister 9dddcd8566 Move NetworkException formatting into NotificationEngine 2012-05-09 14:19:46 -04:00
Keith Winstein 0901cd8431 Don't flag blank->blank predictions. 2012-05-05 11:21:01 -04:00
Keegan McAllister 5cff456400 Define PROG, for newer versions of skalibs
Needed to build from our source tarball on some Gentoo systems.

Closes #239.
Closes #254.
2012-05-05 02:11:02 -04:00
Keith Winstein 2ea3f3a347 Warn when server has not heard from us (even if we have heard from server) 2012-04-30 22:43:45 -04:00
Massimo Gengarelli 49fc21c8a3 Catch by const reference (remove Eclipse warnings)
(closes #245)
2012-04-29 02:24:31 -04:00
Keith Winstein d5051569b8 COND_THIRD_POLL _overrides_ broken system poll; does not add to it.
Fixes OS X 10.6 problem from 7fe9f29.
2012-04-25 02:22:38 -04:00
Anders Kaseorg 7fe9f29448 Set poll_LIBS = libpoll.a in Makefile.am so dependency tracking works
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-04-21 02:19:36 -04:00
Anders Kaseorg 735dcd6ad5 Clarify COND_THIRD_LIBSTDDJB code
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-04-21 02:19:13 -04:00
Keith Winstein 62330a0b09 Put the setsid() where it belongs 2012-04-20 20:38:27 -04:00
Keith Winstein b9a8b8c009 More helpful messages when locale not found or wrong (closes #209) 2012-04-19 02:35:14 -04:00
Keith Winstein 24d48f37a4 Don't try to predict scroll until we have versioned cell predictions.
Closes #6
2012-04-19 01:11:16 -04:00
Keith Winstein 1508d40b4c Chdir to homedir (closes #193) and honor .hushlogin (closes #216). 2012-04-19 01:03:25 -04:00
Keith Winstein b127a92617 Back off overlay frame rate when all timing tests have fired (saves CPU)
Closes #225 github issue (Jay Freeman).
2012-04-19 00:07:51 -04:00
Keith Winstein 9cf87d224e Verbose server now turns on verbose transport layer (much more output)
Relevant to #217.
2012-04-18 10:47:18 -04:00
Keegan McAllister a289a2319e Preserve RLIMIT_CORE hard limit, and restore soft limit before exec
Closes #196.
2012-04-16 20:03:04 -04:00
Keith Winstein 3ed9c0fb77 Only print motd for login shells, not when command is specified. 2012-04-16 18:34:53 -04:00
Keith Winstein 68825dccde Print /etc/motd before login shell. Closes #190. 2012-04-16 18:19:45 -04:00
Keith Winstein b4263b354e Check for paths.h and make sure we have _PATH_BSHELL 2012-04-16 17:51:52 -04:00
Jay Freeman (saurik) 2462434390 Use _PATH_BSHELL for "/bin/sh" and fix argv[0].
The previous code had the following issues:

1) hardcoded the path of /bin/sh (should use paths.h)
2) threw away the variable with the fallback shell
3) prepended - to the path rather than the shell name
4) added a - before explicit chosen non-shell commands

Closes #199.
2012-04-16 17:40:30 -04:00
Keith Winstein bcb96d9337 Change some asserts flagging runtime errors to fatal_asserts (Anders Kaseorg) 2012-04-16 06:27:14 -04:00
Keith Winstein a8c3df9c80 More robust shutdown sequence with warning on unclean shutdown. 2012-04-16 06:22:35 -04:00
Keith Winstein 79542106c1 Make still_connecting() false if network not initialized, to fix confusing error msg. 2012-04-16 03:51:30 -04:00
Keegan McAllister c8fe5a3999 mosh-client: Return true for still_connecting if !network
Fixes:

    $ MOSH_KEY=foo ./mosh-client 127.0.0.1 60010
    Crypto exception: Key must be 22 letters long.
    Segmentation fault

Closes #189.
2012-04-16 03:46:09 -04:00
Keith Winstein cca925e020 Reset prediction engine after size has changed (i.e. after Resize is applied) 2012-04-16 03:06:11 -04:00
Keith Winstein 119bbcaced Add nicer message and 15s timeout if server can't be reached on UDP.
(Closes #152)
2012-04-16 02:31:27 -04:00
Ed Schouten 033953dcd2 Don't leak utmpx entries on shutdown.
As far as I know, for all implementations of libutempter, the
utempter_remove_added_record() function depends on the file descriptor
passed to utempter_add_record() to still be valid. The reason for this,
is that this file descriptor is propagated to the setuid utility that is
responsible for modifying utmpx.

Modify the code to remove the utmpx entry before closing the
pseudo-terminal master device. While there, simply use
utempter_remove_record(), which takes the file descriptor explicitly.
The advantage is that this prevents potential foot-shooting in the
future. Visual inspection of the source code will make it more obvious
that utempter depends on the file descriptor.

Closes #179.
2012-04-16 01:37:48 -04:00
Keith Winstein 7103c5f48b Using fclose() instead of close() means future fprintf() doesn't kill us on Mac. 2012-04-15 23:25:21 -04:00
Keegan McAllister cd2d482484 Don't use *_t for our own typedefs
It's reserved by POSIX.

(closes #158 pull request)
2012-04-15 13:50:18 -04:00
Keegan McAllister 280400152d Replace one find_if with a loop
g++/libstdc++ 4.1.2 is unhappy with this use of bind2nd, possibly because the
argument is a reference.  This is a problem for EL5.
2012-04-15 13:49:15 -04:00
Keegan McAllister 8bcc001b52 Remove Boost entirely 2012-04-15 13:49:15 -04:00
Keegan McAllister 2675f13676 Remove boost::lambda remaining instances from terminaloverlay.cc 2012-04-15 13:49:15 -04:00
Keegan McAllister 06fa8eaedb Remove boost::lambda from PredictionEngine::get_or_make_row 2012-04-15 13:49:15 -04:00
Keegan McAllister 5f1bc88ed8 Remove boost::lambda with for_each in terminaloverlay.cc 2012-04-15 13:49:15 -04:00
Keegan McAllister 8f099cafbb Remove boost::lambda from ConditionalOverlayCell::get_validity 2012-04-15 13:49:15 -04:00
Keegan McAllister 4152af9c8e Remove BOOST_AUTO from terminaloverlay.cc 2012-04-15 13:49:15 -04:00
Keith Winstein cc8b1f293a Forcibly detach earlier in blind effort to fix #114 (needs testing) 2012-04-15 12:38:48 -04:00
Keith Winstein 8f60f7ab05 Convey locale-related environment variables as backup, and nicer error.
Fixes #74.
2012-04-14 16:56:48 -04:00
Keith Winstein 597756b846 Document new -v (verbose) server switch. 2012-04-14 13:56:46 -04:00