summaryrefslogtreecommitdiff
path: root/gpsd.h-tail
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-01-31 15:16:55 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-01-31 15:16:55 -0500
commit6ee9556f2fea231303a488f07a8b0e0a9f552dc4 (patch)
tree0427b34e9b53f0317b3c575ef5cd507bae92be35 /gpsd.h-tail
parent2bab8b2a7f810a4a430def430cbae80d74c572c6 (diff)
downloadgpsd-6ee9556f2fea231303a488f07a8b0e0a9f552dc4.tar.gz
Back out the attempt to use VTIME.
According to Matthias Drochner at http://lists.lysator.liu.se/pipermail/lsh-bugs/2003q4/000151.html: I thought I'd give lsh a try, just to see how it compares to openssh... The client didn't work well on NetBSD, got a message like "unexpected EWOULDBLOCK" on each keystroke. Looked a bit deeper and found that stdin is set to O_NONBLOCK and a raw tty mode with c_cc[VMIN] > 1 and c_cc[VTIME] > 0. I'll append a little test program which does the same. I've tried it on 3 operating systems (Linux, NetBSD, Digital UNIX), and it behaves differently on each: -on Linux, if a key is pressed, the read returns immediately with that one character -on NetBSD, the read returns with no data but EWOULDBLOCK -on D'UNIX, the poll() doesn't teturn before 4 keypresses are done; the read() returns these 4 characters Indeed, in SUSv2's termios page is a sentence which says that if both O_NONBLOCK and VTIME>0 are set, the behaviour is more or less undefined. I've solved my immediate problems by setting VMIN to 1 instead of 4 in unix_interact.c:do_make_raw(), but VTIME is still pointless, so I wouldn't call this a clean solution. All regression tests pass.
Diffstat (limited to 'gpsd.h-tail')
-rw-r--r--gpsd.h-tail2
1 files changed, 0 insertions, 2 deletions
diff --git a/gpsd.h-tail b/gpsd.h-tail
index edc8930f..8cdf1761 100644
--- a/gpsd.h-tail
+++ b/gpsd.h-tail
@@ -389,7 +389,6 @@ struct gps_type_t {
#ifdef TIMEHINT_ENABLE
/*@null@*/double (*time_offset)(struct gps_device_t *session);
#endif /* TIMEHINT_ENABLE */
- int minlength;
};
/*
@@ -824,7 +823,6 @@ extern void ntrip_report(struct gps_context_t *,
extern void gpsd_tty_init(struct gps_device_t *);
extern int gpsd_serial_open(struct gps_device_t *);
-extern void gpsd_optimize_io(struct gps_device_t *, const int, const bool);
extern bool gpsd_set_raw(struct gps_device_t *);
extern ssize_t gpsd_serial_write(struct gps_device_t *,
const char *, const size_t);