summaryrefslogtreecommitdiff
path: root/xgpsspeed.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2004-08-24 04:36:48 +0000
committerEric S. Raymond <esr@thyrsus.com>2004-08-24 04:36:48 +0000
commitd73d62094f43ec4ebc4b87c8692899dbf4311a91 (patch)
treeab4c1a6b8ff9c2e405f3010218481208d435f45d /xgpsspeed.c
parent5d12d379b518af0216ec539532c4f9090024fe95 (diff)
downloadgpsd-d73d62094f43ec4ebc4b87c8692899dbf4311a91.tar.gz
SIGHUP resets the daeon.
Diffstat (limited to 'xgpsspeed.c')
-rw-r--r--xgpsspeed.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xgpsspeed.c b/xgpsspeed.c
index e3d53297..450f58f3 100644
--- a/xgpsspeed.c
+++ b/xgpsspeed.c
@@ -140,7 +140,10 @@ int main(int argc, char **argv)
*/
gpsd_fd = gps_open(&gpsdata, NULL, NULL);
if (gpsd_fd < 0)
+ {
+ fprintf(stderr, "xgpsspeed: no gpsd running.\n");
exit(2);
+ }
XtAppAddInput(app, gpsd_fd, (XtPointer) XtInputReadMask,
handle_input, NULL);