summaryrefslogtreecommitdiff
path: root/cgps.c
diff options
context:
space:
mode:
authorTimo Juhani Lindfors <timo.lindfors@iki.fi>2010-09-05 13:42:26 -0400
committerJon Schlueter <jon.schlueter@gmail.com>2010-11-06 11:44:22 -0400
commitec49c35087b480dcd42690de77fb7a15a4583a82 (patch)
tree4b425d8cd84b7fb69797d1e78f733038bbacbc31 /cgps.c
parentef094ede1f49b74fb13fc9171627c0d4ffda74f4 (diff)
downloadgpsd-ec49c35087b480dcd42690de77fb7a15a4583a82.tar.gz
Bug gpsd:17494 fix: cgps don't exit if interrupted
Do not exit if select is interrupted by a signal. Since we have signal handlers for INT and HUP they still work but WINCH does not. Closes gpsd:17494.
Diffstat (limited to 'cgps.c')
-rw-r--r--cgps.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cgps.c b/cgps.c
index 20fe712f..f52f6c11 100644
--- a/cgps.c
+++ b/cgps.c
@@ -895,6 +895,9 @@ int main(int argc, char *argv[])
data = select(gpsdata.gps_fd + 1, &rfds, NULL, NULL, &timeout);
if (data == -1) {
+ if (errno == EINTR) {
+ continue;
+ }
fprintf(stderr, "cgps: socket error 3\n");
exit(2);
} else if (data) {