Anders Kaseorg
10dca75fb2
Type Select::got_signal as volatile sig_atomic_t
...
Fixes #634 .
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2018-01-18 19:25:05 -05:00
John Hood
b1a6f7c144
Eliminate unnecessary, trailing else conditional blocks.
2017-08-06 22:22:05 -04:00
John Hood
a3b05e69b6
Add missing shared::make_shared<T>()
2017-08-02 22:07:02 -04:00
John Hood
95f7bf3e6c
Let bools be bools.
2017-04-24 22:40:30 -04:00
John Hood
ba5f33fd76
Do clock_gettime() weak symbol check only on OS X/iOS
2016-12-29 23:46:00 -05:00
John Hood
b2eac32ebc
Try multiple clock sources at runtime.
2016-12-29 15:10:06 -05:00
John Hood
9ffbeddbc8
Put spin debug under -vv flag, and add to mosh-client
2016-11-06 06:15:41 -05:00
John Hood
f89f1da0b5
Log/limit pselect() with timeout of 0
...
This is not a fix for bad timeouts, but rather a band-aid
to keep Mosh from consuming large amounts of CPU time.
2016-11-06 06:15:41 -05:00
john hood
70c62c5a94
#include <memory> for std::shared
2016-05-11 00:51:00 -04:00
John Hood
6b71351138
select.h: workaround and report Cygwin select() bug
...
Resolves #705 .
2016-01-11 04:37:35 -05:00
John Hood
ca21788c96
Remove usage of exceptional fdsets with select().
2016-01-11 04:35:21 -05:00
John Hood
589d21bbf2
Add make_shared emulation for std::tr1::shared_ptr; use make_shared
2015-12-06 17:42:34 -05:00
John Hood
b41bad918d
Make Terminal::Framebuffer::Rows shared and copy-on-write.
...
* Support both std:: and std::tr1:: shared_ptr. FreeBSD 10 now uses C++11 by default.
* Remove Framebuffer pointers in STMClient
2015-12-06 17:42:34 -05:00
John Hood
b742e958b6
mosh-server: Support timeouts on lost connectivity to network client.
...
Closes #690 .
2015-11-24 02:36:08 -05:00
John Hood
026a3f0346
Resolve cppcheck issues.
...
Signed-off-by: John Hood <cgull@glup.org >
2015-06-10 23:50:56 -04:00
Anton Lundin
3f38a10a2e
Implement CTTY grabbing when TIOCSCTTY is missing
...
AIX is missing TIOCSCTTY, so we assign us a ctty via a open of the slave
device.
Signed-off-by: Anton Lundin <glance@acc.umu.se >
2015-05-25 02:22:21 -04:00
John Hood
30c09b4613
Comply with new C++11 token pasting rules
2015-05-25 02:17:24 -04:00
Anders Kaseorg
e52d22b6da
Timestamp: Prevent integer overflow on Darwin PPC 32-bit
...
A Darwin PPC 32-bit user observes huge values numer == 1000000000 and
denom == 18431683 returned from mach_timebase_info(). For these
values, mach_absolute_time() * numer overflows uint64_t every 1000.82
seconds, and 1000000 * denom always overflows uint32_t, with the
effect of making time run backwards at -11190660 times its usual
speed.
This bug was masked on Darwin x86 64-bit, where numer == denom == 1.
Fix it by doing the conversion with double arithmetic instead.
Closes #479 .
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2015-05-25 02:14:53 -04:00
Jérémie Courrèges-Anglas
24b078a5a1
workaround for systems not providing pselect
...
using a mix of good old select and sigprocmask
Signed-off-by: Jérémie Courrèges-Anglas <jca@wxcvbn.org >
2013-04-16 11:09:42 +02:00
Keith Winstein
e9c4184c27
Fix compilation bug when clock_gettime missing
2013-01-14 22:25:03 -05:00
Anton Lundin
f1a4e209b6
Use c99 standard name instead of gcc-ism
2012-12-01 14:49:29 +01:00
Anton Lundin
846a2fa535
Port my_forkpty to be compatible with AIX
2012-12-01 14:49:29 +01:00
Keith Winstein
d17fb7824b
Reset fd sets every time we poll (because network.fd() can now change)
2012-10-05 00:06:37 -04:00
Keith Winstein
50e75b3127
Make sure we're not querying fds that we never polled for in the first place
2012-10-04 23:53:34 -04:00
Timo Sirainen
4f66e9a2e0
Remove __STRING() usage. It's nonstandard, while #expr works everywhere nowadays.
...
Signed-off-by: Timo Sirainen <tss@iki.fi >
2012-08-11 17:14:44 -04:00
Timo Sirainen
0c5307f345
Added forkpty() and cfmakeraw() fallback implementations if they don't exist.
...
Signed-off-by: Timo Sirainen <tss@iki.fi >
2012-08-11 17:14:44 -04:00
Keith Winstein
7989d381cf
Make fatal_assert() use abort() instead of exit()
2012-08-07 12:34:45 -04:00
Keith Winstein
a744004bf6
Get system timestamp less often (only after sleeping/selecting)
2012-07-26 21:13:26 -04:00
Keith Winstein
92ecb99b71
Add OpenSSL licensing exception
2012-07-20 16:46:00 -04:00
Keith Winstein
5e86700a0a
Fix OS X 10.5 problem where FD_ISSET() argument isn't const
2012-05-23 03:19:36 -04:00
Keith Winstein
a4dd2fed89
Use static local variable for consistency with compressor, dispatch table
2012-05-16 00:17:37 -04:00
Keegan McAllister
dd941df19d
Remove unused sigfd and skalibs
...
Closes #265 .
2012-05-16 00:00:27 -04:00
Keegan McAllister
1d0b16881c
Switch to pselect(2) and add signal handling to Select class
2012-05-16 00:00:27 -04:00
Keegan McAllister
7fc1aa30a5
Move dummy_fd_set into Select
...
Now that we have select.cc.
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
0019b9d92a
Add a convenience wrapper for select(2)
2012-05-16 00:00: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
8f60f7ab05
Convey locale-related environment variables as backup, and nicer error.
...
Fixes #74 .
2012-04-14 16:56:48 -04:00
Keegan McAllister
0eec0b60f0
Linux: Use our own signalfd wrapper, rather than libstddjb
...
selfpipe already does a fine job of interfacing to signalfd. But Debian and
Ubuntu want us to depend on the skalibs-dev package rather than build libstddjb
ourselves. That would be fine except that skalibs-dev has static libraries
only, and they aren't built with -fPIC. This interferes with building
mosh-{client,server} as position-independent executables, which is a desirable
security measure.
So we have our own wrapper, which invokes either signalfd or selfpipe. And we
build it ourselves with our own flags, because it's part of the Mosh project
proper.
(closes #108 )
2012-04-13 12:33:21 -04:00
Keegan McAllister
d2434d1a79
Check compiler support for -fno-default-inline and -pipe
...
clang was spewing warnings about the unrecognized -fno-default-inline. (Oddly,
it warns only with -c, not when compiling directly to an executable.) For
completeness we also check -pipe, even though clang is OK with that one.
It should be fine to omit either flag. gcc -fno-default-inline drops the
implicit 'inline' annotation on functions defined inside a class scope, but
'inline' is only a hint anyway. -fno-default-inline does not change linkage.
-pipe is merely a compile speed optimization.
2012-04-13 12:27:27 -04:00
Keegan McAllister
349e2d20c8
Use the hardening flags
...
Closes #79 .
2012-04-13 12:25:09 -04:00
termie
774e50dc19
Allow lowercase "utf-8" in charset for OS X iTerm.
...
Closes #104 github pull request.
2012-04-11 02:49:35 -04:00
Keegan McAllister
7ed5174aa7
Move some locale handling into one place
2012-03-26 20:08:55 -04:00
Keegan McAllister
a9b5850019
Split the fatal_assert message into two lines
...
(closes #78 )
2012-03-24 11:14:42 -04:00
Keegan McAllister
84b4330ba2
Actually print the message on fatal_assert failure
2012-03-24 11:14:30 -04:00
Keith Winstein
56e52190eb
Fix warning for clang++ -- we now compile on clang++ with -Werror
2012-03-13 18:54:37 -04:00
Keith Winstein
df5d163f9c
Fix asserts with side-effects (per Keegan McAllister)
2012-03-08 10:50:19 -05:00
Anders Kaseorg
aad760e7d6
Make warning CXXFLAGS configurable
...
This turns off -Werror by default except in the Debian package.
-Werror is inherently unportable and breaks things on OS X. While it
can cause problems in Debian too, this is at least a little better.
It also turns off -pedantic in src/protobufs, because apparently
protoc output doesn’t compile with -pedantic on all platforms.
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2012-03-07 03:05:35 -05:00
Anders Kaseorg
689eedc271
Compile without --std=c++0x
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2012-02-17 21:29:51 -05:00
Keith Winstein
3781a290c8
Add copyright/license notices
2012-02-06 20:52:48 -05:00