summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--src/thread.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3191e3d..8c9c8b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
* src/thread.c (thread_main_loop): Moved the looping code into
this function from the main() function. Just a bit of clean up.
+ (thread_main): Changed the default cancelation point to
+ asynchronous, which means immediately. This should fix up the
+ problem where the threads would not free correctly.
2002-04-07 Robert James Kaes <rjkaes@flarenet.com>
diff --git a/src/thread.c b/src/thread.c
index 534ed8b..40beab8 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -1,4 +1,4 @@
-/* $Id: thread.c,v 1.22 2002-04-08 21:35:10 rjkaes Exp $
+/* $Id: thread.c,v 1.23 2002-04-09 00:37:43 rjkaes Exp $
*
* Handles the creation/destruction of the various threads required for
* processing incoming connections.
@@ -118,6 +118,9 @@ thread_main(void *arg)
socklen_t clilen;
struct thread_s *ptr;
+ /* Set the cancelation type to immediate. */
+ pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
+
ptr = (struct thread_s *) arg;
cliaddr = safemalloc(addrlen);