diff options
-rw-r--r-- | gpspipe.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -347,10 +347,14 @@ int main( int argc, char **argv) } } } - } else if (readbytes < 0) { - (void) fprintf(stderr, "gpspipe: read error %s(%d)\n", + } else { + if (readbytes < 0) { + (void) fprintf(stderr, "gpspipe: read error %s(%d)\n", strerror(errno), errno); - exit(1); + exit(1); + } else { + exit(0); + } } } |