diff options
author | Timo Juhani Lindfors <timo.lindfors@iki.fi> | 2010-09-05 13:42:26 -0400 |
---|---|---|
committer | Jon Schlueter <jon.schlueter@gmail.com> | 2010-11-06 11:44:22 -0400 |
commit | ec49c35087b480dcd42690de77fb7a15a4583a82 (patch) | |
tree | 4b425d8cd84b7fb69797d1e78f733038bbacbc31 /cgps.c | |
parent | ef094ede1f49b74fb13fc9171627c0d4ffda74f4 (diff) | |
download | gpsd-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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) { |