diff options
author | Gary E. Miller <gem@rellim.com> | 2012-04-04 16:05:28 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2012-04-04 16:05:28 -0700 |
commit | 7a96e8dd4ff638c12b0d7f443c2b023200828974 (patch) | |
tree | 3de74620e00f789d708144868ad8ae28939e46d3 /ntpshm.c | |
parent | 4debaea5de11318f5ae9c48aba8bab6dac618d26 (diff) | |
download | gpsd-7a96e8dd4ff638c12b0d7f443c2b023200828974.tar.gz |
Log the last way PPS thread can exit silently.
Diffstat (limited to 'ntpshm.c')
-rw-r--r-- | ntpshm.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -627,10 +627,15 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg) * is that no GPS lights up more than one of these pins. By waiting on * all of them we remove a configuration switch. */ - while (ioctl(session->gpsdata.gps_fd, TIOCMIWAIT, PPS_LINE_TIOC) == 0) { + while (1) { int ok = 0; char *log = NULL; + if (ioctl(session->gpsdata.gps_fd, TIOCMIWAIT, PPS_LINE_TIOC) != 0) { + gpsd_report(LOG_ERROR, "PPS ioctl(TIOCMIWAIT) failed\n"); + break; + } + /*@-noeffect@*/ #ifdef HAVE_CLOCK_GETTIME /* using clock_gettime() here, that is nSec, |