From ce4ac04e30eea2f817729627120791ebb12e69ed Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sun, 9 Aug 2009 17:29:09 -0400 Subject: [PATCH] pth_join() the cancelled assuan command thread. --- src/pwmd.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pwmd.c b/src/pwmd.c index 46a43779..51e537ac 100644 --- a/src/pwmd.c +++ b/src/pwmd.c @@ -1563,8 +1563,17 @@ void cleanup_unlink_cb(void *arg) void cleanup_cancel_cb(void *arg) { pth_t tid = arg; + pth_attr_t attr; + gint join; + attr = pth_attr_of(tid); + pth_attr_get(attr, PTH_ATTR_JOINABLE, &join); pth_cancel(tid); + + if (join) { + gpg_error_t rc; + pth_join(tid, (void **)&rc); + } } static void *keepalive_thread(void *arg) -- 2.11.4.GIT