diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-03-02 06:33:54 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-02 06:33:54 -0500 |
commit | d898a7d56d9f9a9fc877049ad7f2b31dc1a5a6e7 (patch) | |
tree | 2f673beb27c06a4e0e38214d9f4e93bf9d34c3b8 /gpsctl.c | |
parent | ede118ecbb53c2e903965a67d57f841ce4b8fc85 (diff) | |
download | gpsd-d898a7d56d9f9a9fc877049ad7f2b31dc1a5a6e7.tar.gz |
Use pselect unconditionally. We're assuming POSIX-2001.1 conformance.
All regression tests pass.
Diffstat (limited to 'gpsctl.c')
-rw-r--r-- | gpsctl.c | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -71,9 +71,6 @@ static bool gps_query(/*@out@*/struct gps_data_t *gpsdata, char buf[BUFSIZ]; va_list ap; time_t starttime; -#ifdef COMPAT_SELECT - struct timeval tv; -#else struct timespec tv; sigset_t oldset, blockset; @@ -83,7 +80,6 @@ static bool gps_query(/*@out@*/struct gps_data_t *gpsdata, (void)sigaddset(&blockset, SIGTERM); (void)sigaddset(&blockset, SIGQUIT); (void)sigprocmask(SIG_BLOCK, &blockset, &oldset); -#endif /* COMPAT_SELECT */ va_start(ap, fmt); (void)vsnprintf(buf, sizeof(buf)-2, fmt, ap); @@ -107,13 +103,8 @@ static bool gps_query(/*@out@*/struct gps_data_t *gpsdata, /*@ -usedef -type -nullpass -compdef @*/ tv.tv_sec = 2; -#ifdef COMPAT_SELECT - tv.tv_usec = 0; - if (select(gpsdata->gps_fd + 1, &rfds, NULL, NULL, &tv) == -1) { -#else tv.tv_nsec = 0; if (pselect(gpsdata->gps_fd + 1, &rfds, NULL, NULL, &tv, &oldset) == -1) { -#endif if (errno == EINTR || !FD_ISSET(gpsdata->gps_fd, &rfds)) continue; gpsd_report(&context.errout, LOG_ERROR, "select %s\n", strerror(errno)); |