diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2006-09-04 17:54:47 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2006-09-04 17:54:47 +0000 |
commit | e6384da0ab49d552953c76509b28acaeb6a521c8 (patch) | |
tree | 012b3cce32f3a19c5d5610016484a5fa69741db4 /cgps.c | |
parent | 3828e962870730a5f973372c37c2af5de96498c3 (diff) | |
download | gpsd-e6384da0ab49d552953c76509b28acaeb6a521c8.tar.gz |
Don't let cgps spin if read fails. Prompted by Petr Slansky on gpsd-dev.
Diffstat (limited to 'cgps.c')
-rw-r--r-- | cgps.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -457,7 +457,8 @@ int main(int argc, char *argv[]) } else if( data ) { /* code that calls gps_poll(gpsdata) */ - (void)gps_poll(gpsdata); + if (gps_poll(gpsdata) != 0) + die(1); } /* Check for user input. */ |