diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2008-09-10 05:40:44 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2008-09-10 05:40:44 +0000 |
commit | 5d5c12da291fda82c41c69814d7f89c8f481e2f5 (patch) | |
tree | 1de8967a5bd2915cad071f1bd5e2b985bedf9f0a /libgps.c | |
parent | d708929df18bcc7d8248f1295db3d47a3271e591 (diff) | |
download | gpsd-5d5c12da291fda82c41c69814d7f89c8f481e2f5.tar.gz |
Clean up a canceled thread. From Bartos-Elekes Zsolt on gpsd-dev
Diffstat (limited to 'libgps.c')
-rw-r--r-- | libgps.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -603,6 +603,7 @@ int gps_del_callback(struct gps_data_t *gpsdata, pthread_t *handler) { int res; /*@i@*/res = pthread_cancel(*handler); /* we cancel the whole thread */ + pthread_join(*handler, NULL); /* wait for thread to actually terminate */ gpsdata->thread_hook = NULL; /* finally we cancel the callback */ if (res == 0) /* tell gpsd to stop sending data */ (void)gps_query(gpsdata,"w-\n"); /* disable watcher mode */ |