summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2006-12-01 21:59:06 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2006-12-01 21:59:06 +0000
commitd996bcd726138d2375c898e420d94ada6666095e (patch)
treed0065e40b8d884b7155611fe89d39816adc9755b /gpsd.c
parentb98506ff55fa03d1e9002f957a5ff353d07670f1 (diff)
downloadgpsd-d996bcd726138d2375c898e420d94ada6666095e.tar.gz
Prevent signal race. One symptom is deadlocks in gpsd_close
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gpsd.c b/gpsd.c
index cad5d5f9..0bad2c26 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -102,6 +102,8 @@ static struct gps_context_t context = {
static void onsig(int sig)
{
+ /* ignore whatever signal we got until we can properly reset */
+ (void)signal(sig, SIG_DFL);
longjmp(restartbuf, sig+1);
}